cleanups (WiP)
authorManuel Nickschas <sputnick@quassel-irc.org>
Sat, 6 Sep 2008 16:54:09 +0000 (18:54 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 18 Sep 2008 06:12:16 +0000 (08:12 +0200)
src/common/main.cpp
src/qtui/mainwin.cpp

index aa1c75a..b5e205b 100644 (file)
@@ -142,22 +142,10 @@ int main(int argc, char **argv) {
   signal(SIGBUS, handle_crash);
   signal(SIGSEGV, handle_crash);
 #endif // #if defined(HAVE_EXECINFO) and not defined(Q_OS_MAC)
   signal(SIGBUS, handle_crash);
   signal(SIGSEGV, handle_crash);
 #endif // #if defined(HAVE_EXECINFO) and not defined(Q_OS_MAC)
-  
+
   Global::registerMetaTypes();
   Global::setupVersion();
 
   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);
 #if defined BUILD_CORE
   Global::runMode = Global::CoreOnly;
   QCoreApplication app(argc, argv);
@@ -230,7 +218,7 @@ int main(int argc, char **argv) {
   QCoreApplication::setApplicationName("Quassel IRC");
   QCoreApplication::setOrganizationName("Quassel Project");
 
   QCoreApplication::setApplicationName("Quassel IRC");
   QCoreApplication::setOrganizationName("Quassel Project");
 
-  
+
 #ifndef BUILD_QTUI
   Core::instance();  // create and init the core
 #endif
 #ifndef BUILD_QTUI
   Core::instance();  // create and init the core
 #endif
@@ -252,10 +240,10 @@ int main(int argc, char **argv) {
   }
 #endif
 
   }
 #endif
 
-#ifndef BUILD_CORE 
+#ifndef BUILD_CORE
   app.resumeSessionIfPossible();
 #endif
   app.resumeSessionIfPossible();
 #endif
-  
+
   int exitCode = app.exec();
 
 #ifndef BUILD_QTUI
   int exitCode = app.exec();
 
 #ifndef BUILD_QTUI
index 91e8adb..caecd84 100644 (file)
@@ -111,7 +111,7 @@ MainWin::MainWin(QWidget *parent)
   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
   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&)));
 }
   connect(app, SIGNAL(saveStateToSession(const QString&)), this, SLOT(saveStateToSession(const QString&)));
   connect(app, SIGNAL(saveStateToSessionSettings(SessionSettings&)), this, SLOT(saveStateToSessionSettings(SessionSettings&)));
 }
@@ -770,7 +770,7 @@ void MainWin::on_actionDebugNetworkModel_triggered(bool) {
 void MainWin::saveStateToSession(const QString &sessionId) {
   return;
   SessionSettings s(sessionId);
 void MainWin::saveStateToSession(const QString &sessionId) {
   return;
   SessionSettings s(sessionId);
-  
+
   s.setValue("MainWinSize", size());
   s.setValue("MainWinPos", pos());
   s.setValue("MainWinState", saveState());
   s.setValue("MainWinSize", size());
   s.setValue("MainWinPos", pos());
   s.setValue("MainWinState", saveState());