X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcore.h;h=f9746451f4c9fdd54543beac683977f061da6a19;hb=e4fc79c07f5301ce2c7888e709ada0945b675c4f;hp=2015f70a3dc27fc9cfce1d98a190cece0cc9dd41;hpb=25a3ae50ac0d9835283e4f5f10fcfcc10ed5575d;p=quassel.git diff --git a/src/core/core.h b/src/core/core.h index 2015f70a..f9746451 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -504,6 +504,19 @@ public: static QVariantList backendInfo(); + /** + * Checks if a storage backend is the default storage backend. This + * hardcodes this information into the core (not the client). + * + * \param backend The backend to check. + * + * @return True if storage backend is default, false otherwise. + */ + static inline bool isStorageBackendDefault(const Storage *backend) + { + return (backend->displayName() == "SQLite") ? true : false; + } + static QString setup(const QString &adminUser, const QString &adminPassword, const QString &backend, const QVariantMap &setupData); static inline QTimer &syncTimer() { return instance()->_storageSyncTimer; } @@ -560,7 +573,7 @@ private: void unregisterStorageBackend(Storage *); bool selectBackend(const QString &backend); bool createUser(); - void saveBackendSettings(const QString &backend, const QVariantMap &settings); + bool saveBackendSettings(const QString &backend, const QVariantMap &settings); QVariantMap promptForSettings(const Storage *storage); private: