aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/decode_as_dialog.cpp
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-08-04 16:37:48 -0700
committerGuy Harris <guy@alum.mit.edu>2014-08-04 23:38:13 +0000
commitbbda3dd7c1998b98202af8b24de415412298db86 (patch)
tree59082faf756fcca12f040a94664edb8e9f865c4b /ui/qt/decode_as_dialog.cpp
parentce7b041305330e2cb87d895f57381241702c9d85 (diff)
Write out decode_as entries from the actual dissector tables.
Have a save_decode_as_entries() routine in ui/decode_as_utils.c, that does all the work of saving the entries by iterating through all the changed entries with dissector_all_tables_foreach_changed(). When doing so, write out the selector for integral values in decimal, as older versions of Wireshark only handled decimal values, and some of those older versions are EOLed and won't be fixed. Change-Id: I2dab461604524b98e3515867839a4b86c86c5d7b Reviewed-on: https://code.wireshark.org/review/3426 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt/decode_as_dialog.cpp')
-rw-r--r--ui/qt/decode_as_dialog.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/ui/qt/decode_as_dialog.cpp b/ui/qt/decode_as_dialog.cpp
index f384d01a50..702f309cd6 100644
--- a/ui/qt/decode_as_dialog.cpp
+++ b/ui/qt/decode_as_dialog.cpp
@@ -492,19 +492,7 @@ void DecodeAsDialog::curProtoDestroyed()
void DecodeAsDialog::on_buttonBox_accepted()
{
- FILE *da_file = decode_as_open();
- if (!da_file) return;
-
- for (int i = 0; i < ui->decodeAsTreeWidget->topLevelItemCount(); i++) {
- QTreeWidgetItem *item = ui->decodeAsTreeWidget->topLevelItem(i);
-
- decode_as_write_entry(da_file,
- ui_name_to_name_[item->text(table_col_)],
- item->text(selector_col_).toUtf8().constData(),
- item->text(default_col_).toUtf8().constData(),
- item->text(proto_col_).toUtf8().constData());
- }
- fclose(da_file);
+ save_decode_as_entries();
}
void DecodeAsDialog::on_buttonBox_helpRequested()