diff options
author | Gerald Combs <gerald@wireshark.org> | 2016-06-22 12:44:02 -0700 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-06-23 03:44:54 +0000 |
commit | 300e055ab6e3ede51de2258c83d9aeab4b7f3701 (patch) | |
tree | 0db3e2c2984b3e3a7d47207cc13c35de0ecc77e5 /ui/qt/endpoint_dialog.cpp | |
parent | 933c079598079e1786b07cda5e1b48684ca0ac3c (diff) | |
download | wireshark-300e055ab6e3ede51de2258c83d9aeab4b7f3701.tar.gz |
Qt: Use queued signals+slots for filter actions
Many of our dialogs can send an "apply this display filter" signal to
the main window. Applying a display filter in turn creates a nested
event loop via cf_read+update_progress_dlg. If the "apply" signal+slot
is directly connected (which is the default, and which means we're
calling into a function table) we can close the dialog while the signal
is firing, which means we return into a deleted object.
Make all of the filterAction signals+slots queued instead of direct.
Bug: 12523
Change-Id: Ica331054c0aa52a7f33bd8df1fa65ecd09fdc292
Reviewed-on: https://code.wireshark.org/review/16080
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/endpoint_dialog.cpp')
-rw-r--r-- | ui/qt/endpoint_dialog.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/qt/endpoint_dialog.cpp b/ui/qt/endpoint_dialog.cpp index aa595f075d..e4fd6b7f77 100644 --- a/ui/qt/endpoint_dialog.cpp +++ b/ui/qt/endpoint_dialog.cpp @@ -117,8 +117,8 @@ void EndpointDialog::captureFileClosing() // on a live capture file. for (int i = 0; i < trafficTableTabWidget()->count(); i++) { EndpointTreeWidget *cur_tree = qobject_cast<EndpointTreeWidget *>(trafficTableTabWidget()->widget(i)); - disconnect(cur_tree, SIGNAL(filterAction(QString&,FilterAction::Action,FilterAction::ActionType)), - this, SIGNAL(filterAction(QString&,FilterAction::Action,FilterAction::ActionType))); + disconnect(cur_tree, SIGNAL(filterAction(QString,FilterAction::Action,FilterAction::ActionType)), + this, SIGNAL(filterAction(QString,FilterAction::Action,FilterAction::ActionType))); } displayFilterCheckBox()->setEnabled(false); enabledTypesPushButton()->setEnabled(false); @@ -144,8 +144,8 @@ bool EndpointDialog::addTrafficTable(register_ct_t *table) this, SLOT(itemSelectionChanged())); connect(endp_tree, SIGNAL(titleChanged(QWidget*,QString)), this, SLOT(setTabText(QWidget*,QString))); - connect(endp_tree, SIGNAL(filterAction(QString&,FilterAction::Action,FilterAction::ActionType)), - this, SIGNAL(filterAction(QString&,FilterAction::Action,FilterAction::ActionType))); + connect(endp_tree, SIGNAL(filterAction(QString,FilterAction::Action,FilterAction::ActionType)), + this, SIGNAL(filterAction(QString,FilterAction::Action,FilterAction::ActionType))); connect(nameResolutionCheckBox(), SIGNAL(toggled(bool)), endp_tree, SLOT(setNameResolutionEnabled(bool))); |