diff options
author | Gerald Combs <gerald@wireshark.org> | 2013-08-23 02:34:51 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2013-08-23 02:34:51 +0000 |
commit | 186babc6ba30e635d29f235d95e388dbe434fa26 (patch) | |
tree | e690dd515dcdca74d388e890a329fb1ab3ae83fc /ui | |
parent | 4daaf4fb575449da402bd9b4df6935176e431187 (diff) |
When we close a main window, delete the welcome screen, which in turn
deletes the interface list, which in turn kills off the dumpcap process
it may be running. This should hopefully keep us from leaving dumpcap
processes running in the background on Windows. (Am I the only one
running QtShark on that platform?)
svn path=/trunk/; revision=51485
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/interface_tree.cpp | 5 | ||||
-rw-r--r-- | ui/qt/main_window.cpp | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/ui/qt/interface_tree.cpp b/ui/qt/interface_tree.cpp index 607146a755..a630f8657a 100644 --- a/ui/qt/interface_tree.cpp +++ b/ui/qt/interface_tree.cpp @@ -73,11 +73,10 @@ InterfaceTree::~InterfaceTree() { while (*iter) { QList<int> *points; - QVariant v; - v = (*iter)->data(1, Qt::UserRole); - points = v.value<QList<int> *>(); + points = (*iter)->data(1, Qt::UserRole).value<QList<int> *>(); delete(points); + ++iter; } } diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index a06c2b4367..2517084104 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -386,6 +386,9 @@ void MainWindow::closeEvent(QCloseEvent *event) { return; } + // Make sure we kill any open dumpcap processes. + delete main_welcome_; + if(testCaptureFileClose(true)) { /* QCoreApplication::quit() won't exit properly * because when during initialization phase we are not in the event loop */ |