aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/dissector_tables_dialog.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/dissector_tables_dialog.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/dissector_tables_dialog.cpp')
-rw-r--r--ui/qt/dissector_tables_dialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/dissector_tables_dialog.cpp b/ui/qt/dissector_tables_dialog.cpp
index 07483bb113..7a1490b21b 100644
--- a/ui/qt/dissector_tables_dialog.cpp
+++ b/ui/qt/dissector_tables_dialog.cpp
@@ -83,7 +83,7 @@ DissectorTablesDialog::DissectorTablesDialog(QWidget *parent) :
{
ui->setupUi(this);
if (parent) loadGeometry(parent->width() * 3 / 4, parent->height() * 3 / 4);
-
+ setAttribute(Qt::WA_DeleteOnClose, true);
setWindowTitle(wsApp->windowTitleString(tr("Dissector Tables")));
on_tableTreeWidget_itemSelectionChanged();