summaryrefslogtreecommitdiffstats
path: root/ui/qt/tap_parameter_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ui/qt/tap_parameter_dialog.cpp')
-rw-r--r--ui/qt/tap_parameter_dialog.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/ui/qt/tap_parameter_dialog.cpp b/ui/qt/tap_parameter_dialog.cpp
index 4652b672..eeb838dd 100644
--- a/ui/qt/tap_parameter_dialog.cpp
+++ b/ui/qt/tap_parameter_dialog.cpp
@@ -43,10 +43,11 @@
#include <ui/qt/utils/qt_ui_utils.h>
#include "main_application.h"
+#include <ui/qt/widgets/wireshark_file_dialog.h>
+
#include <QClipboard>
#include <QContextMenuEvent>
#include <QMessageBox>
-#include <QFileDialog>
// The GTK+ counterpart uses tap_param_dlg, which we don't use. If we
// need tap parameters we should probably create a TapParameterDialog
@@ -97,6 +98,7 @@ TapParameterDialog::TapParameterDialog(QWidget &parent, CaptureFile &cf, int hel
QString filter = ui->displayFilterLineEdit->text();
emit updateFilter(filter);
}
+ updateWidgets();
show_timer_ = new QTimer(this);
setRetapOnShow(true);
}
@@ -496,7 +498,7 @@ void TapParameterDialog::updateWidgets()
bool edit_enable = true;
bool apply_enable = true;
- if (file_closed_) {
+ if (file_closed_ || !cap_file_.isValid()) {
edit_enable = false;
apply_enable = false;
} else if (!ui->displayFilterLineEdit->checkFilter()) {
@@ -511,9 +513,9 @@ void TapParameterDialog::updateWidgets()
void TapParameterDialog::on_applyFilterButton_clicked()
{
- beginRetapPackets();
- if (!ui->displayFilterLineEdit->checkFilter())
+ if (!ui->displayFilterLineEdit->checkFilter()) {
return;
+ }
QString filter = ui->displayFilterLineEdit->text();
emit updateFilter(filter);
@@ -528,7 +530,6 @@ void TapParameterDialog::on_applyFilterButton_clicked()
fillTree();
ui->applyFilterButton->setEnabled(af_enabled);
ui->displayFilterLineEdit->setEnabled(df_enabled);
- endRetapPackets();
}
void TapParameterDialog::on_actionCopyToClipboard_triggered()
@@ -548,7 +549,7 @@ void TapParameterDialog::on_actionSaveAs_triggered()
#ifdef Q_OS_WIN
HANDLE da_ctx = set_thread_per_monitor_v2_awareness();
#endif
- QFileDialog SaveAsDialog(this, mainApp->windowTitleString(tr("Save Statistics As…")),
+ WiresharkFileDialog SaveAsDialog(this, mainApp->windowTitleString(tr("Save Statistics As…")),
get_open_dialog_initial_dir());
SaveAsDialog.setNameFilter(tr("Plain text file (*.txt);;"
"Comma separated values (*.csv);;"
@@ -582,7 +583,7 @@ void TapParameterDialog::on_actionSaveAs_triggered()
}
// Get selected filename and add extension of necessary
- QString file_name = SaveAsDialog.selectedFiles()[0];
+ QString file_name = SaveAsDialog.selectedNativePath();
if (!file_name.endsWith(file_ext, Qt::CaseInsensitive)) {
file_name.append(file_ext);
}