signal(SIGBUS, handle_crash);
signal(SIGSEGV, handle_crash);
#endif // #if defined(HAVE_EXECINFO) and not defined(Q_OS_MAC)
-
+
Global::registerMetaTypes();
Global::setupVersion();
-/*
-#if defined BUILD_CORE
- Global::runMode = Global::CoreOnly;
- QCoreApplication app(argc, argv);
-#elif defined BUILD_QTUI
- Global::runMode = Global::ClientOnly;
- QApplication app(argc, argv);
-#else
- Global::runMode = Global::Monolithic;
- QApplication app(argc, argv);
-#endif
-*/
#if defined BUILD_CORE
Global::runMode = Global::CoreOnly;
QCoreApplication app(argc, argv);
QCoreApplication::setApplicationName("Quassel IRC");
QCoreApplication::setOrganizationName("Quassel Project");
-
+
#ifndef BUILD_QTUI
Core::instance(); // create and init the core
#endif
}
#endif
-#ifndef BUILD_CORE
+#ifndef BUILD_CORE
app.resumeSessionIfPossible();
#endif
-
+
int exitCode = app.exec();
#ifndef BUILD_QTUI
connect(desktopNotifications, SIGNAL(NotificationClosed(uint, uint)), this, SLOT(desktopNotificationClosed(uint, uint)));
connect(desktopNotifications, SIGNAL(ActionInvoked(uint, const QString&)), this, SLOT(desktopNotificationInvoked(uint, const QString&)));
#endif
- QtUiApplication* app = dynamic_cast<QtUiApplication*> qApp;
+ QtUiApplication* app = qobject_cast<QtUiApplication*> qApp;
connect(app, SIGNAL(saveStateToSession(const QString&)), this, SLOT(saveStateToSession(const QString&)));
connect(app, SIGNAL(saveStateToSessionSettings(SessionSettings&)), this, SLOT(saveStateToSessionSettings(SessionSettings&)));
}
void MainWin::saveStateToSession(const QString &sessionId) {
return;
SessionSettings s(sessionId);
-
+
s.setValue("MainWinSize", size());
s.setValue("MainWinPos", pos());
s.setValue("MainWinState", saveState());