Who stole the ! from main.cpp?
[quassel.git] / src / common / main.cpp
index f715192..9785169 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-07 by the Quassel IRC Team                         *
+ *   Copyright (C) 2005-08 by the Quassel Project                          *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -22,6 +22,7 @@
 #include "identity.h"
 #include "settings.h"
 #include <QString>
+#include <QTimer>
 #include <QTranslator>
 
 #if defined BUILD_CORE
@@ -85,7 +86,7 @@ int main(int argc, char **argv) {
 
   QCoreApplication::setOrganizationDomain("quassel-irc.org");
   QCoreApplication::setApplicationName("Quassel IRC");
-  QCoreApplication::setOrganizationName("Quassel IRC Development Team");  // FIXME
+  QCoreApplication::setOrganizationName("Quassel Project");
 
   // Check if a non-standard core port is requested
   QStringList args = QCoreApplication::arguments();  // TODO Build a CLI parser
@@ -106,11 +107,13 @@ int main(int argc, char **argv) {
 #ifndef BUILD_CORE
   QtUi *gui = new QtUi();
   Client::init(gui);
-  gui->init();
+  // init gui only after the event loop has started
+  QTimer::singleShot(0, gui, SLOT(init()));
+  //gui->init();
 #endif
 
 #ifndef BUILD_QTUI
-  if(args.contains("--norestore")) {
+  if(!args.contains("--norestore")) {
     Core::restoreState();
   }
 #endif