From 60ce7bce5f5dfd8bccf02dd6fa47b7c1f97fd3ba Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Mon, 2 Jun 2014 11:24:58 +0200 Subject: [PATCH] Add TFTP export for Qt too Change-Id: I056829d48aa49eb106c76c8f572c0f8b6e1a4245 Reviewed-on: https://code.wireshark.org/review/1916 Reviewed-by: Evan Huus --- ui/qt/export_object_dialog.cpp | 5 +++++ ui/qt/export_object_dialog.h | 2 +- ui/qt/main_window.h | 1 + ui/qt/main_window.ui | 23 ++++++++++------------- ui/qt/main_window_slots.cpp | 5 +++++ 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/ui/qt/export_object_dialog.cpp b/ui/qt/export_object_dialog.cpp index ef3363b79b..4c65cdc6ab 100644 --- a/ui/qt/export_object_dialog.cpp +++ b/ui/qt/export_object_dialog.cpp @@ -99,6 +99,11 @@ ExportObjectDialog::ExportObjectDialog(QWidget *parent, capture_file *cf, Object tap_packet_ = eo_smb_packet; eo_protocoldata_resetfn_ = eo_smb_cleanup; break; + case Tftp: + tap_name_ = "tftp_eo"; + name_ = "TFTP"; + tap_packet_ = eo_tftp_packet; + break; } save_bt_ = eo_ui_->buttonBox->button(QDialogButtonBox::Save); diff --git a/ui/qt/export_object_dialog.h b/ui/qt/export_object_dialog.h index 281314d019..be1534efa9 100644 --- a/ui/qt/export_object_dialog.h +++ b/ui/qt/export_object_dialog.h @@ -55,7 +55,7 @@ class ExportObjectDialog : public QDialog Q_OBJECT public: - enum ObjectType { Dicom, Http, Smb }; + enum ObjectType { Dicom, Http, Smb, Tftp }; explicit ExportObjectDialog(QWidget *parent, capture_file *cf, ObjectType object_type); ~ExportObjectDialog(); diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h index 1ea43582dc..87b3ac5a2d 100644 --- a/ui/qt/main_window.h +++ b/ui/qt/main_window.h @@ -232,6 +232,7 @@ private slots: void on_actionFileExportObjectsDICOM_triggered(); void on_actionFileExportObjectsHTTP_triggered(); void on_actionFileExportObjectsSMB_triggered(); + void on_actionFileExportObjectsTFTP_triggered(); void on_actionFilePrint_triggered(); void on_actionFileExportPDU_triggered(); diff --git a/ui/qt/main_window.ui b/ui/qt/main_window.ui index 5407b7bf10..e6d6df8045 100644 --- a/ui/qt/main_window.ui +++ b/ui/qt/main_window.ui @@ -28,16 +28,7 @@ - - 0 - - - 0 - - - 0 - - + 0 @@ -68,7 +59,7 @@ - 900000000 + 900000000; @@ -106,7 +97,7 @@ 0 0 960 - 22 + 27 @@ -145,6 +136,7 @@ + @@ -362,7 +354,7 @@ - + @@ -1707,6 +1699,11 @@ Show/hide the display filter toolbar + + + &TFTP + + diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index be4a5ad8a0..e9d8166743 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -1393,6 +1393,11 @@ void MainWindow::on_actionFileExportObjectsSMB_triggered() new ExportObjectDialog(this, cap_file_, ExportObjectDialog::Smb); } +void MainWindow::on_actionFileExportObjectsTFTP_triggered() +{ + new ExportObjectDialog(this, cap_file_, ExportObjectDialog::Tftp); +} + void MainWindow::on_actionFilePrint_triggered() { PrintDialog pdlg(this, cap_file_);