Qt: Fix order of ShowAs enums

The ShowAs enum should stay in the same order as the Items
are added to the ShowAs combobox, because setCurrentIndex()
is used with the enum values, e.g. when setting the value to
"Show As Image" when the bytes are an image.
Fixup c9e08b7be3
This commit is contained in:
John Thacker 2023-02-01 21:15:41 -05:00
parent c0c939c4f3
commit 15dfa3aa20
1 changed files with 4 additions and 1 deletions

View File

@ -65,6 +65,9 @@ private slots:
void saveAs();
private:
/* Keep these enums in the same order (generally alphabetically)
* that they are added to the combo boxes.
*/
enum DecodeAsType {
DecodeAsNone,
DecodeAsBASE64,
@ -78,13 +81,13 @@ private:
ShowAsASCII,
ShowAsASCIIandControl,
ShowAsCArray,
ShowAsRustArray,
ShowAsEBCDIC,
ShowAsHexDump,
ShowAsHTML,
ShowAsImage,
ShowAsJson,
ShowAsRAW,
ShowAsRustArray,
ShowAsCodec, // Ordered to match the UTF-8 combobox index
ShowAsYAML,
};