From bc4cb51ccb27aaac1687e3e3255c7321e28d0a33 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 24 Jul 2017 12:56:01 +0200 Subject: gui/main: put TerminateProcess call back after app exits --- gui/main-window.cpp | 7 +++---- gui/main.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'gui') diff --git a/gui/main-window.cpp b/gui/main-window.cpp index 8d0c005d..225d0629 100644 --- a/gui/main-window.cpp +++ b/gui/main-window.cpp @@ -309,6 +309,9 @@ bool MainWindow::get_new_config_name_from_dialog(QString& ret) MainWindow::~MainWindow() { + if (tray) + tray->hide(); + stop_tracker_(); } void MainWindow::set_working_directory() @@ -650,10 +653,6 @@ void MainWindow::showCurveConfiguration() void MainWindow::exit() { - if (tray) - tray->hide(); - stop_tracker_(); - QCoreApplication::exit(0); } diff --git a/gui/main.cpp b/gui/main.cpp index a70abde2..99f63267 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -185,18 +185,18 @@ main(int argc, char** argv) app.setQuitOnLastWindowClosed(false); app.exec(); - // msvc crashes in Qt plugin system's dtor -#if defined(_MSC_VER) - qDebug() << "exit: terminating"; - TerminateProcess(GetCurrentProcess(), 0); -#endif - app.exit(0); qDebug() << "exit: window"; } while (false); + // msvc crashes in Qt plugin system's dtor +#if defined(_MSC_VER) + qDebug() << "exit: terminating"; + TerminateProcess(GetCurrentProcess(), 0); +#endif + qDebug() << "exit: main()"; return 0; -- cgit v1.2.3