diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2021-04-11 13:53:39 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-04-19 12:51:01 -0700 |
commit | e22b33795b5e0b101a744d03093278cf7991687a (patch) | |
tree | 2ebc24224c101a1ff16a87508894d9ec285e9470 /core | |
parent | c5eb806adb345e24b13ac4bf106cceb1dc9d3431 (diff) | |
download | subsurface-e22b33795b5e0b101a744d03093278cf7991687a.tar.gz |
cloudstorage: add API to just update on-disk setting
This way we can change the host that we will use next time the app runs.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/settings/qPrefCloudStorage.cpp | 7 | ||||
-rw-r--r-- | core/settings/qPrefCloudStorage.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/core/settings/qPrefCloudStorage.cpp b/core/settings/qPrefCloudStorage.cpp index 6caf619dd..2c320400b 100644 --- a/core/settings/qPrefCloudStorage.cpp +++ b/core/settings/qPrefCloudStorage.cpp @@ -37,6 +37,13 @@ void qPrefCloudStorage::set_cloud_base_url(const QString &value) emit instance()->cloud_base_urlChanged(value); } } + +void qPrefCloudStorage::store_cloud_base_url(const QString &value) +{ + // this is used if we want to update the on-disk settings without changing + // the runtime preference + qPrefPrivate::propSetValue(keyFromGroupAndName(group, "cloud_base_url"), value, default_prefs.cloud_base_url); +} void qPrefCloudStorage::disk_cloud_base_url(bool doSync) { if (doSync) { diff --git a/core/settings/qPrefCloudStorage.h b/core/settings/qPrefCloudStorage.h index d30f26ae0..288b6e37e 100644 --- a/core/settings/qPrefCloudStorage.h +++ b/core/settings/qPrefCloudStorage.h @@ -57,6 +57,7 @@ public: public slots: static void set_cloud_auto_sync(bool value); static void set_cloud_base_url(const QString &value); + static void store_cloud_base_url(const QString &value); static void set_cloud_storage_email(const QString &value); static void set_cloud_storage_email_encoded(const QString &value); static void set_cloud_storage_password(const QString &value); |