aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/tap_parameter_dialog.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-08-21 15:02:20 -0700
committerGerald Combs <gerald@wireshark.org>2015-08-22 01:29:06 +0000
commit74177d90d32b485adc3fb83c703e712af6e46663 (patch)
treeda9b2b647041179c78aff68f188a41b05ce60444 /ui/qt/tap_parameter_dialog.cpp
parenta66a95c7addef022b3f55255dada4232a46ca4d5 (diff)
Statistics dialog fixups.
Fix the "retap on show" behavior in TapParameterDialog. It was filling in the tree when it shouldn't have. Set the capture stop flag when WiresharkDialog closes. Change-Id: I5e85f11cab32e8b958deabb58186a855b5fcaa84 Reviewed-on: https://code.wireshark.org/review/10186 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/tap_parameter_dialog.cpp')
-rw-r--r--ui/qt/tap_parameter_dialog.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/ui/qt/tap_parameter_dialog.cpp b/ui/qt/tap_parameter_dialog.cpp
index 229ddc01d7..f257eae38c 100644
--- a/ui/qt/tap_parameter_dialog.cpp
+++ b/ui/qt/tap_parameter_dialog.cpp
@@ -75,8 +75,7 @@ const QString TapParameterDialog::action_name_ = "TapParameterAction";
TapParameterDialog::TapParameterDialog(QWidget &parent, CaptureFile &cf, int help_topic) :
WiresharkDialog(parent, cf),
ui(new Ui::TapParameterDialog),
- help_topic_(help_topic),
- retap_on_show_(true)
+ help_topic_(help_topic)
{
ui->setupUi(this);
@@ -107,14 +106,15 @@ TapParameterDialog::TapParameterDialog(QWidget &parent, CaptureFile &cf, int hel
QString filter = ui->displayFilterLineEdit->text();
emit updateFilter(filter, true);
}
- if (retap_on_show_) {
- QTimer::singleShot(0, this, SLOT(fillTree()));
- }
+ show_timer_ = new QTimer(this);
+ setRetapOnShow(true);
}
TapParameterDialog::~TapParameterDialog()
{
delete ui;
+ show_timer_->stop();
+ delete show_timer_;
}
void TapParameterDialog::registerDialog(const QString title, const char *cfg_abbr, register_stat_group_t group, stat_tap_init_cb tap_init_cb, tpdCreator creator)
@@ -190,6 +190,14 @@ void TapParameterDialog::setHint(const QString &hint)
ui->hintLabel->show();
}
+void TapParameterDialog::setRetapOnShow(bool retap)
+{
+ show_timer_->stop();
+ if (retap) {
+ show_timer_->singleShot(0, this, SLOT(fillTree()));
+ }
+}
+
void TapParameterDialog::filterActionTriggered()
{
FilterAction *fa = qobject_cast<FilterAction *>(QObject::sender());