aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/main_window_slots.cpp
diff options
context:
space:
mode:
authorMikael Kanstrup <mikael.kanstrup@gmail.com>2017-09-26 13:14:02 +0200
committerAnders Broman <a.broman58@gmail.com>2017-10-05 04:21:22 +0000
commit867e6f0e006ae633ab7928a20919e0011bc0c63f (patch)
treee84e5a3ba224022aa03c35c5b041fd535126c646 /ui/qt/main_window_slots.cpp
parent3c9f440ac60ba83f155a89a851f9a1d3cc947f8d (diff)
qt: Fix leaked dialogs
Some dialogs are allocated on heap but not freed when the dialog boxes are closed. This means one dialog instance is leaked each time opened/closed. Also dialogs being subclasses of GeometryStateDialog means they might lack a parent reference and are not automatically freed on application shutdown either. Fix these leaks by letting the dialogs automatically destroy themselves on close (via WA_DeleteOnClose). Capture filter, display filter and capture interfaces dialogs are also leaked on application shutdown. These dialogs are protected by a NULL check that at least prevent multiple instances. Though none of them are freed on application shutdown. Fix leaks by freeing when main window is destroyed. Bug: 14071 Change-Id: I8c5c5a75ad3c89abb5996941875ba5d616a22d9c Reviewed-on: https://code.wireshark.org/review/23747 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/main_window_slots.cpp')
-rw-r--r--ui/qt/main_window_slots.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp
index 59e6d2ebbf..ff0c3e4163 100644
--- a/ui/qt/main_window_slots.cpp
+++ b/ui/qt/main_window_slots.cpp
@@ -2728,7 +2728,6 @@ void MainWindow::matchFieldFilter(FilterAction::Action action, FilterAction::Act
emit filterAction(field_filter, action, filter_type);
}
-static FilterDialog *display_filter_dlg_ = NULL;
void MainWindow::on_actionAnalyzeDisplayFilters_triggered()
{
if (!display_filter_dlg_) {
@@ -3736,7 +3735,6 @@ void MainWindow::on_actionCaptureRestart_triggered()
startCapture();
}
-static FilterDialog *capture_filter_dlg_ = NULL;
void MainWindow::on_actionCaptureCaptureFilters_triggered()
{
if (!capture_filter_dlg_) {