diff options
author | jan Iversen <jani@apache.org> | 2018-08-19 14:55:52 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-25 11:49:47 -0700 |
commit | b7a1bb670ce11b22e52361f4152b4853b97e13f5 (patch) | |
tree | 2ba1f77b8b34b9bcbfa46358feab90cb9152dfc3 /core/settings | |
parent | 5dd0981961f367054e38b164804548e7d9b16bfa (diff) | |
download | subsurface-b7a1bb670ce11b22e52361f4152b4853b97e13f5.tar.gz |
core/tests: add loadFromCloud var to qPrefCloudStorage
Add special property loadFromCloud + mail to qPrefCloudStorage
this variable is used by qmlmanager.cpp
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'core/settings')
-rw-r--r-- | core/settings/qPrefCloudStorage.cpp | 10 | ||||
-rw-r--r-- | core/settings/qPrefCloudStorage.h | 4 |
2 files changed, 13 insertions, 1 deletions
diff --git a/core/settings/qPrefCloudStorage.cpp b/core/settings/qPrefCloudStorage.cpp index ddb370630..9392a24c0 100644 --- a/core/settings/qPrefCloudStorage.cpp +++ b/core/settings/qPrefCloudStorage.cpp @@ -7,7 +7,6 @@ static const QString group = QStringLiteral("CloudStorage"); qPrefCloudStorage::qPrefCloudStorage(QObject *parent) : QObject(parent) { } - qPrefCloudStorage *qPrefCloudStorage::instance() { static qPrefCloudStorage *self = new qPrefCloudStorage; @@ -114,3 +113,12 @@ void qPrefCloudStorage::disk_userid(bool doSync) } } } + +bool qPrefCloudStorage::loadFromCloud(const QString& email) +{ + return qPrefPrivate::propValue(QString("loadFromCloud") + email, false).toBool(); +} +void qPrefCloudStorage::set_loadFromCloud(const QString& email, bool done) +{ + qPrefPrivate::propSetValue(QString("loadFromCloud") + email, done); +} diff --git a/core/settings/qPrefCloudStorage.h b/core/settings/qPrefCloudStorage.h index 91864afbc..4684399a0 100644 --- a/core/settings/qPrefCloudStorage.h +++ b/core/settings/qPrefCloudStorage.h @@ -45,6 +45,8 @@ public: static bool save_userid_local() { return prefs.save_userid_local; } static QString userid() { return prefs.userid; } + static bool loadFromCloud(const QString& email); + public slots: static void set_cloud_base_url(const QString &value); static void set_cloud_storage_email(const QString &value); @@ -59,6 +61,8 @@ public slots: static void set_save_userid_local(bool value); static void set_userid(const QString &value); + static void set_loadFromCloud(const QString& email, bool done); + signals: void cloud_base_url_changed(const QString &value); void cloud_storage_email_changed(const QString &value); |