Don't dissect twice from TapParameterDialog.
When the user applies a display filter in TapParameterDialog we're about to start tapping. We need to set the display filter in the main window but we shouldn't apply it. Change-Id: I08bed5c7f470f1dbf32817a7d999f09d2c52f168 Reviewed-on: https://code.wireshark.org/review/10287 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
parent
d76718651b
commit
c1c6132c0d
|
@ -1521,8 +1521,8 @@ void MainWindow::openTapParameterDialog(const QString cfg_str, const QString arg
|
|||
|
||||
connect(tp_dialog, SIGNAL(filterAction(QString&,FilterAction::Action,FilterAction::ActionType)),
|
||||
this, SLOT(filterAction(QString&,FilterAction::Action,FilterAction::ActionType)));
|
||||
connect(tp_dialog, SIGNAL(updateFilter(QString&, bool)),
|
||||
this, SLOT(filterPackets(QString&, bool)));
|
||||
connect(tp_dialog, SIGNAL(updateFilter(QString)),
|
||||
df_combo_box_->lineEdit(), SLOT(setText(QString)));
|
||||
tp_dialog->show();
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ TapParameterDialog::TapParameterDialog(QWidget &parent, CaptureFile &cf, int hel
|
|||
|
||||
if (!ui->displayFilterLineEdit->text().isEmpty()) {
|
||||
QString filter = ui->displayFilterLineEdit->text();
|
||||
emit updateFilter(filter, true);
|
||||
emit updateFilter(filter);
|
||||
}
|
||||
show_timer_ = new QTimer(this);
|
||||
setRetapOnShow(true);
|
||||
|
@ -521,7 +521,7 @@ void TapParameterDialog::on_applyFilterButton_clicked()
|
|||
return;
|
||||
|
||||
QString filter = ui->displayFilterLineEdit->text();
|
||||
emit updateFilter(filter, false);
|
||||
emit updateFilter(filter);
|
||||
// If we wanted to be fancy we could add an isRetapping function to
|
||||
// either WiresharkDialog or CaptureFile and use it in updateWidgets
|
||||
// to enable and disable the apply button as needed.
|
||||
|
|
|
@ -77,7 +77,7 @@ public:
|
|||
|
||||
signals:
|
||||
void filterAction(QString& filter, FilterAction::Action action, FilterAction::ActionType type);
|
||||
void updateFilter(QString &filter, bool force = false);
|
||||
void updateFilter(QString filter);
|
||||
|
||||
public slots:
|
||||
|
||||
|
|
Loading…
Reference in New Issue