summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Bellegarde <gnumdk@gmail.com>2011-11-10 13:21:56 +0100
committerCedric Bellegarde <gnumdk@gmail.com>2011-11-10 13:21:56 +0100
commit93c8b0ab6c3c681dd4d48e0fa843bb955b211738 (patch)
tree3f528e73cb06af7bcdc39f61cc9d48716d76aa5c
parentGet sure against "strange" behaviours in opensearchengine (diff)
downloadrekonq-93c8b0ab6c3c681dd4d48e0fa843bb955b211738.tar.xz
Fix BUG:280627 Force QApplication to quit when no more available window
-rw-r--r--src/application.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/application.cpp b/src/application.cpp
index d29324c4..6fd5e3c5 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -470,6 +470,13 @@ MainWindow *Application::newMainWindow(bool withTab)
void Application::removeMainWindow(MainWindow *window)
{
m_mainWindows.removeOne(window);
+
+ // QApplication should quit as soon we have no mainwindow
+ // But QtWebkit seems to create windows without Qt::WA_QuitOnClose attribute,
+ // making rekonq keep running after last window is closed
+ if ( m_mainWindows.length() == 0 )
+ QCoreApplication::quit ();
+
}