diff options
-rw-r--r-- | gui/main.cpp | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/gui/main.cpp b/gui/main.cpp index d9aba3ce..efc0b12b 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -151,25 +151,27 @@ main(int argc, char** argv) (void) QCoreApplication::installTranslator(&t); } - do - { - mem<MainWindow> w = std::make_shared<MainWindow>(); + do + { + mem<MainWindow> w = std::make_shared<MainWindow>(); - if (!w->isEnabled()) - break; + if (!w->isEnabled()) + break; - if (!w->start_in_tray()) - { - w->setVisible(true); - w->show(); - } - else - w->setVisible(false); + if (!w->start_in_tray()) + { + w->setVisible(true); + w->show(); + } + else + w->setVisible(false); + + app.setQuitOnLastWindowClosed(false); + app.exec(); - app.setQuitOnLastWindowClosed(false); - app.exec(); + app.exit(0); - qDebug() << "exit: window"; + qDebug() << "exit: window"; } while (false); |