summaryrefslogtreecommitdiff
path: root/gui/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/main.cpp')
-rw-r--r--gui/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/gui/main.cpp b/gui/main.cpp
index fe96caa..1cb2d0e 100644
--- a/gui/main.cpp
+++ b/gui/main.cpp
@@ -48,7 +48,6 @@ QString getAppName(QJsonValue info, QString provider) {
auto handler = [](int sig) -> void {
printf("\nCatched signal(%d): quitting\n", sig);
- Quit();
QApplication::quit();
};
@@ -82,6 +81,11 @@ int main(int argc, char **argv) {
app.setQuitOnLastWindowClosed(false);
app.setAttribute(Qt::AA_UseHighDpiPixmaps);
+ QObject::connect(&app, &QApplication::aboutToQuit, []() {
+ qDebug() << ">>> Quitting, bye!";
+ Quit();
+ });
+
#ifdef OS_WIN
signal(SIGINT, handler);
signal(SIGTERM, handler);