X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoreapplication.cpp;h=f0c84f32480446e03917f3aacd392581c530ed32;hp=99fcfd80c1477205cca6f877a5f1083cd4d43958;hb=7c9c1b348382b8b77f96a883945c522d32a478d5;hpb=965183188ee726036685fcba379c2559bd183247 diff --git a/src/core/coreapplication.cpp b/src/core/coreapplication.cpp index 99fcfd80..f0c84f32 100644 --- a/src/core/coreapplication.cpp +++ b/src/core/coreapplication.cpp @@ -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 * @@ -26,7 +26,7 @@ CoreApplicationInternal::CoreApplicationInternal() : _coreCreated(false) { - Q_INIT_RESOURCE(sql); + } CoreApplicationInternal::~CoreApplicationInternal() { @@ -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; @@ -62,17 +61,10 @@ bool CoreApplicationInternal::init() { /*****************************************************************************/ CoreApplication::CoreApplication(int &argc, char **argv) -#ifdef HAVE_KDE - : KApplication(false), -#else - : QCoreApplication(argc, argv), -#endif - Quassel() + : QCoreApplication(argc, argv), Quassel() { setRunMode(Quassel::CoreOnly); _internal = new CoreApplicationInternal(); - - qInstallMsgHandler(Logger::logMessage); } CoreApplication::~CoreApplication() { @@ -80,7 +72,9 @@ CoreApplication::~CoreApplication() { } bool CoreApplication::init() { - if(Quassel::init()) - return _internal->init(); + if(Quassel::init() && _internal->init()) { + qInstallMsgHandler(Logger::logMessage); + return true; + } return false; }