From 300e055ab6e3ede51de2258c83d9aeab4b7f3701 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 22 Jun 2016 12:44:02 -0700 Subject: 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 Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- ui/qt/protocol_hierarchy_dialog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/qt/protocol_hierarchy_dialog.h') diff --git a/ui/qt/protocol_hierarchy_dialog.h b/ui/qt/protocol_hierarchy_dialog.h index b3963cd4df..6814e59041 100644 --- a/ui/qt/protocol_hierarchy_dialog.h +++ b/ui/qt/protocol_hierarchy_dialog.h @@ -44,7 +44,7 @@ public: ~ProtocolHierarchyDialog(); signals: - void filterAction(QString& filter, FilterAction::Action action, FilterAction::ActionType type); + void filterAction(QString filter, FilterAction::Action action, FilterAction::ActionType type); private slots: void showProtoHierMenu(QPoint pos); -- cgit v1.2.1