Semi-yearly copyright bump
[quassel.git] / src / core / core.cpp
index 889d15a..6917508 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2016 by the Quassel Project                        *
+ *   Copyright (C) 2005-2018 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -403,10 +403,15 @@ bool Core::initStorage(const QString &backend, const QVariantMap &settings, bool
             return false;  // trigger setup process
         if (storage->setup(settings))
             return initStorage(backend, settings, false);
+        return false;
+
     // if initialization wasn't successful, we quit to keep from coming up unconfigured
     case Storage::NotAvailable:
         qCritical() << "FATAL: Selected storage backend is not available:" << backend;
-        exit(EXIT_FAILURE);
+        if (!setup)
+            exit(EXIT_FAILURE);
+        return false;
+
     case Storage::IsReady:
         // delete all other backends
         _registeredStorageBackends.clear();
@@ -495,10 +500,15 @@ bool Core::initAuthenticator(const QString &backend, const QVariantMap &settings
             return false;  // trigger setup process
         if (auth->setup(settings))
             return initAuthenticator(backend, settings, false);
+        return false;
+
     // if initialization wasn't successful, we quit to keep from coming up unconfigured
     case Authenticator::NotAvailable:
         qCritical() << "FATAL: Selected auth backend is not available:" << backend;
-        exit(EXIT_FAILURE);
+        if (!setup)
+            exit(EXIT_FAILURE);
+        return false;
+
     case Authenticator::IsReady:
         // delete all other backends
         _registeredAuthenticators.clear();