diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-02-26 10:39:27 -0800 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-03-01 08:44:00 +0000 |
commit | b5b5f08be1ec26340235b5b7eed411a2083f73dc (patch) | |
tree | 06abfbcc0c63ced50a1a07dbbe97070bafad34f1 /ui/qt | |
parent | e70e560cab016f5170dc0d00726e80ff0de1b11a (diff) |
Qt: Make we shut down cleanly when exiting early.
Add an exit_application() routine that calls wsApp->quit() + exit() in
the Qt UI and exit() in the GTK+ UI. Make sure we call it instead of
exit() when needed.
Bug: 14395
Change-Id: I171b5fd19ce4664db4a2ebb4b8c33e278dcec427
Reviewed-on: https://code.wireshark.org/review/26121
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt')
-rw-r--r-- | ui/qt/wireshark_application.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp index 04721a53a3..24a5232c85 100644 --- a/ui/qt/wireshark_application.cpp +++ b/ui/qt/wireshark_application.cpp @@ -706,6 +706,8 @@ void WiresharkApplication::cleanup() qDeleteAll(recent_captures_); recent_captures_.clear(); + // We might end up here via exit_application. + QThreadPool::globalInstance()->waitForDone(); } void WiresharkApplication::itemStatusFinished(const QString filename, qint64 size, bool accessible) { @@ -883,6 +885,7 @@ WiresharkApplication::WiresharkApplication(int &argc, char **argv) : WiresharkApplication::~WiresharkApplication() { + wsApp = NULL; clearDynamicMenuGroupItems(); free_filter_lists(); } |