Core::instance(); // create and init the core
_coreCreated = true;
+#ifdef HAVE_KDE
// if using KDE, option is called "restore" instead of "norestore"
- if(Quassel::isOptionSet("restore") || !Quassel::isOptionSet("norestore"))
+ if(Quassel::isOptionSet("restore"))
+#else
+ if(!Quassel::isOptionSet("norestore"))
+#endif
Core::restoreState();
return true;
CoreApplication::CoreApplication(int &argc, char **argv)
#ifdef HAVE_KDE
- : KApplication(false),
+: KApplication(false), Quassel() {
+ Q_UNUSED(argc); Q_UNUSED(argv);
#else
- : QCoreApplication(argc, argv),
+: QCoreApplication(argc, argv), Quassel() {
#endif
- Quassel()
-{
+
setRunMode(Quassel::CoreOnly);
_internal = new CoreApplicationInternal();
-
- qInstallMsgHandler(Logger::logMessage);
}
CoreApplication::~CoreApplication() {
}
bool CoreApplication::init() {
- if(Quassel::init())
- return _internal->init();
+ if(Quassel::init() && _internal->init()) {
+ qInstallMsgHandler(Logger::logMessage);
+ return true;
+ }
return false;
}