aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2023-02-01 21:15:41 -0500
committerJohn Thacker <johnthacker@gmail.com>2023-02-01 21:18:58 -0500
commit15dfa3aa20623c76c01c4e97dcab5b236c5c7beb (patch)
treebb104f09e2d00abf2b7c03043e06803a28ba773d /ui
parentc0c939c4f3f8c17492170ee2e20c64ab72985b21 (diff)
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 c9e08b7be317e0e7e0cf95baa64f52d33b392964
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/show_packet_bytes_dialog.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/qt/show_packet_bytes_dialog.h b/ui/qt/show_packet_bytes_dialog.h
index 9c71a2b515..81bb039692 100644
--- a/ui/qt/show_packet_bytes_dialog.h
+++ b/ui/qt/show_packet_bytes_dialog.h
@@ -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,
};