common: Use the Singleton mixin for the Quassel instance
[quassel.git] / src / core / coreapplication.cpp
index cacd671..90f3905 100644 (file)
@@ -36,15 +36,15 @@ CoreApplication::CoreApplication(int &argc, char **argv)
 CoreApplication::~CoreApplication()
 {
     _core.reset();
-    Quassel::destroy();
 }
 
 
-bool CoreApplication::init()
+void CoreApplication::init()
 {
-    if (Quassel::init()) {
-        _core.reset(new Core{}); // FIXME C++14: std::make_unique
-        return _core->init();
+    if (!Quassel::init()) {
+        throw ExitException{EXIT_FAILURE, tr("Could not initialize Quassel!")};
     }
-    return false;
+
+    _core.reset(new Core{}); // FIXME C++14: std::make_unique
+    _core->init();
 }