Don't quit when the last window is closed (could still be running in systray...)
authorManuel Nickschas <sputnick@quassel-irc.org>
Sun, 16 Nov 2008 01:09:51 +0000 (02:09 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 16 Nov 2008 01:09:51 +0000 (02:09 +0100)
This fixes BRs #189 and #321.

src/qtui/mainwin.cpp

index 8287ddd..e45576e 100644 (file)
@@ -83,6 +83,8 @@ MainWin::MainWin(QWidget *parent)
     QApplication::setStyle(style);
   }
 
+  QApplication::setQuitOnLastWindowClosed(false);
+
   setWindowTitle("Quassel IRC");
   setWindowIconText("Quassel IRC");
   updateIcon();
@@ -598,6 +600,7 @@ void MainWin::closeEvent(QCloseEvent *event) {
     event->ignore();
   } else {
     event->accept();
+    QApplication::quit();
   }
 }