Save the mainwindow state properly when exiting the client.
authorManuel Nickschas <sputnick@quassel-irc.org>
Mon, 14 Apr 2008 17:40:46 +0000 (17:40 +0000)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 14 Apr 2008 17:40:46 +0000 (17:40 +0000)
src/qtui/mainwin.cpp

index 1b503ef..d16916d 100644 (file)
@@ -100,6 +100,9 @@ void MainWin::init() {
 
   Client::signalProxy()->attachSignal(this, SIGNAL(requestBacklog(BufferInfo, QVariant, QVariant)));
 
+  // let's hope here that nothing in disconnectedFromCore() needs user interaction/event loop...
+  connect(QApplication::instance(), SIGNAL(aboutToQuit()), this, SLOT(disconnectedFromCore()));
+
   connect(Client::instance(), SIGNAL(networkCreated(NetworkId)), this, SLOT(clientNetworkCreated(NetworkId)));
   connect(Client::instance(), SIGNAL(networkRemoved(NetworkId)), this, SLOT(clientNetworkRemoved(NetworkId)));
   //ui.bufferWidget->init();