Qt: set default current protocol in 'Decode As' window to none instead of HTTP
authorPascal Quantin <pascal.quantin@gmail.com>
Fri, 18 Sep 2015 19:16:57 +0000 (21:16 +0200)
committerMichael Mann <mmann78@netscape.net>
Sat, 19 Sep 2015 00:21:14 +0000 (00:21 +0000)
It makes more sense (not trying to decode UDP/TCP ports as HTTP) and is consistent across dissectors tables (while currently we have an empty field for tables other than UDP/TCP)

Change-Id: I794529f0f46b4197437a1d258f808991ae2338ad
Reviewed-on: https://code.wireshark.org/review/10571
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
ui/qt/decode_as_dialog.cpp

index 631679b12e858918ceb36f42ca24abf11b911556..640063b167eddc75e82219e4f5027396feecc08e 100644 (file)
@@ -51,7 +51,7 @@ const int default_col_  = 3; // aka "initial"
 const int proto_col_    = 4; // aka "current"
 
 const char *default_table_ = "TCP port";
-const char *default_proto_ = "HTTP";
+const char *default_proto_ = DECODE_AS_NONE;
 const char *default_int_selector_ = "0"; // Arbitrary
 const char *default_str_selector_ = "foo"; // Arbitrary
 
@@ -596,7 +596,7 @@ void DecodeAsDialog::applyChanges()
                     continue;
                 }
 
-                if (item->text(proto_col_) == "(none)" || !dissector_info->dissector_handle) {
+                if (item->text(proto_col_) == DECODE_AS_NONE || !dissector_info->dissector_handle) {
                     decode_as_entry->reset_value(decode_as_entry->table_name, selector_value);
                     break;
                 } else {