Don't quit when the last window is closed (could still be running in systray...)
[quassel.git] / src / qtui / mainwin.cpp
index 8287ddd..e45576e 100644 (file)
@@ -83,6 +83,8 @@ MainWin::MainWin(QWidget *parent)
     QApplication::setStyle(style);
   }
 
     QApplication::setStyle(style);
   }
 
+  QApplication::setQuitOnLastWindowClosed(false);
+
   setWindowTitle("Quassel IRC");
   setWindowIconText("Quassel IRC");
   updateIcon();
   setWindowTitle("Quassel IRC");
   setWindowIconText("Quassel IRC");
   updateIcon();
@@ -598,6 +600,7 @@ void MainWin::closeEvent(QCloseEvent *event) {
     event->ignore();
   } else {
     event->accept();
     event->ignore();
   } else {
     event->accept();
+    QApplication::quit();
   }
 }
 
   }
 }