From 15dfa3aa20623c76c01c4e97dcab5b236c5c7beb Mon Sep 17 00:00:00 2001 From: John Thacker Date: Wed, 1 Feb 2023 21:15:41 -0500 Subject: [PATCH] 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 --- ui/qt/show_packet_bytes_dialog.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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, };