Don't show migration warnings if we don't have old settings to migrate
[quassel.git] / src / core / coreapplication.cpp
index 99fcfd8..9b9a0b2 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   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  *
@@ -52,8 +52,7 @@ bool CoreApplicationInternal::init() {
   Core::instance();  // create and init the core
   _coreCreated = true;
 
-  // if using KDE, option is called "restore" instead of "norestore"
-  if(Quassel::isOptionSet("restore") || !Quassel::isOptionSet("norestore"))
+  if(!Quassel::isOptionSet("norestore"))
     Core::restoreState();
 
   return true;
@@ -61,18 +60,9 @@ bool CoreApplicationInternal::init() {
 
 /*****************************************************************************/
 
-CoreApplication::CoreApplication(int &argc, char **argv)
-#ifdef HAVE_KDE
-  : KApplication(false),
-#else
-  : QCoreApplication(argc, argv),
-#endif
-    Quassel()
-{
+CoreApplication::CoreApplication(int &argc, char **argv) : QCoreApplication(argc, argv), Quassel() {
   setRunMode(Quassel::CoreOnly);
   _internal = new CoreApplicationInternal();
-
-  qInstallMsgHandler(Logger::logMessage);
 }
 
 CoreApplication::~CoreApplication() {
@@ -80,7 +70,9 @@ CoreApplication::~CoreApplication() {
 }
 
 bool CoreApplication::init() {
-  if(Quassel::init())
-    return _internal->init();
+  if(Quassel::init() && _internal->init()) {
+    qInstallMsgHandler(Logger::logMessage);
+    return true;
+  }
   return false;
 }