aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/export_dissection_dialog.cpp
diff options
context:
space:
mode:
authorGraham Bloice <graham.bloice@trihedral.com>2018-06-27 19:28:49 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2018-06-27 23:01:03 +0000
commitd8459d8930911b45409371a58f75357a5d2cc986 (patch)
tree614113dbfaa8c5f34ae5df367c5c54107310fa4b /ui/qt/export_dissection_dialog.cpp
parent5d97cee7da31ac605f6a643b6c0492fb1a83456e (diff)
packet export: Add default file extension
Adds a default file extension when exporting packet dissection in various formats: text -> txt postscript -> ps csv -> csv pdml -> pdml psml -> psml c arrays -> c json -> json Change-Id: Ie5d942a3c694abd8edf9df184f6e219d4b870a1b Reviewed-on: https://code.wireshark.org/review/28490 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'ui/qt/export_dissection_dialog.cpp')
-rw-r--r--ui/qt/export_dissection_dialog.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/ui/qt/export_dissection_dialog.cpp b/ui/qt/export_dissection_dialog.cpp
index 3d09b38785..210858a7b1 100644
--- a/ui/qt/export_dissection_dialog.cpp
+++ b/ui/qt/export_dissection_dialog.cpp
@@ -33,6 +33,19 @@
#include <epan/prefs.h>
#include "wireshark_application.h"
+#if !defined(Q_OS_WIN)
+static const QStringList export_extensions = QStringList()
+ << ""
+ << "txt"
+ << ""
+ << "csv"
+ << "psml"
+ << "pdml"
+ << "c"
+ << "json";
+
+#endif
+
ExportDissectionDialog::ExportDissectionDialog(QWidget *parent, capture_file *cap_file, export_type_e export_type):
QFileDialog(parent),
export_type_(export_type),
@@ -242,6 +255,7 @@ void ExportDissectionDialog::exportTypeChanged(QString name_filter)
}
checkValidity();
+ setDefaultSuffix(export_extensions[export_type_]);
}
void ExportDissectionDialog::checkValidity()