summaryrefslogtreecommitdiffhomepage
path: root/gui/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/main.cpp')
-rw-r--r--gui/main.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/gui/main.cpp b/gui/main.cpp
index c3e3999a..47999212 100644
--- a/gui/main.cpp
+++ b/gui/main.cpp
@@ -137,34 +137,36 @@ main(int argc, char** argv)
add_win32_path();
#endif
- {
+ do
+ {
mem<MainWindow> w = std::make_shared<MainWindow>();
+ if (!w->isEnabled())
+ break;
+
if (!w->is_tray_enabled())
{
- w->setHidden(false);
+ w->setVisible(true);
w->show();
}
else
- {
w->setVisible(false);
- w->setHidden(true);
- }
app.setQuitOnLastWindowClosed(false);
app.exec();
qDebug() << "exit: window";
}
+ while (false);
- qDebug() << "exit: main()";
-
- // msvc crashes again in some destructor
+ // msvc crashes in some destructor
#if defined(_MSC_VER)
qDebug() << "exit: terminating";
TerminateProcess(GetCurrentProcess(), 0);
#endif
+ qDebug() << "exit: main()";
+
return 0;
}