diff options
author | Eike Ziller <eike.ziller@digia.com> | 2013-06-06 18:44:53 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2013-06-07 16:44:30 +0200 |
commit | 14fe692933f87d220b8380e62cd5ffdde4892aba (patch) | |
tree | 7df46309cdad361963656a283f07ea1c21a7ce40 | |
parent | 029fd5a572d0377463865f18f928802923548ae2 (diff) | |
download | qt-creator-14fe692933f87d220b8380e62cd5ffdde4892aba.tar.gz |
Explicitly quit when all (relevant) windows are closed
This shouldn't be necessary, works around QTBUG-31569 (Qt5)
Change-Id: Iff157a76a896bc4d6224039ae859788818abba8b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
-rw-r--r-- | src/app/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/app/main.cpp b/src/app/main.cpp index f9b2cd747a..a5c9606c87 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -505,6 +505,10 @@ int main(int argc, char **argv) QObject::connect(&app, SIGNAL(fileOpenRequest(QString)), coreplugin->plugin(), SLOT(fileOpenRequest(QString))); + // quit when last window (relevant window, see WA_QuitOnClose) is closed + // this should actually be the default, but doesn't work in Qt 5 + // QTBUG-31569 + QObject::connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit())); // shutdown plugin manager on the exit QObject::connect(&app, SIGNAL(aboutToQuit()), &pluginManager, SLOT(shutdown())); |