/***************************************************************************
- * Copyright (C) 2005-08 by the Quassel IRC Team *
+ * Copyright (C) 2005-09 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
#include "qtui.h"
#include "sessionsettings.h"
-
-// void myMessageOutput(QtMsgType type, const char *msg) {
-// Client::debugLog() << "Debug:" << msg << '\n';
-// return;
-// // switch (type) {
-// // case QtDebugMsg:
-// // break;
-// // case QtWarningMsg:
-// // fprintf(stderr, "Warning: %s\n", msg);
-// // break;
-// // case QtCriticalMsg:
-// // fprintf(stderr, "Critical: %s\n", msg);
-// // break;
-// // case QtFatalMsg:
-// // fprintf(stderr, "Fatal: %s\n", msg);
-// // abort();
-// // }
-// }
-
QtUiApplication::QtUiApplication(int &argc, char **argv)
#ifdef HAVE_KDE
- : KApplication(), Quassel()
+ : KApplication(),
#else
- : QApplication(argc, argv), Quassel()
+ : QApplication(argc, argv),
#endif
+ Quassel(),
+ _aboutToQuit(false)
{
+#ifdef HAVE_KDE
+ Q_UNUSED(argc)
+ Q_UNUSED(argv)
+#endif
+
setRunMode(Quassel::ClientOnly);
qInstallMsgHandler(Client::logMessage);
Client::destroy();
}
+void QtUiApplication::commitData(QSessionManager &manager) {
+ _aboutToQuit = true;
+}
+
void QtUiApplication::saveState(QSessionManager & manager) {
//qDebug() << QString("saving session state to id %1").arg(manager.sessionId());
AccountId activeCore = Client::currentCoreAccount();