aboutsummaryrefslogtreecommitdiffstats
path: root/core/settings/qPrefCloudStorage.cpp
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2018-10-08 16:15:53 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-09 10:03:21 -0700
commit91c8a2fa5c897111146bff30ff27763ddb92f929 (patch)
tree525bbd9464e904c0d483ad5c1edc02aa879a2348 /core/settings/qPrefCloudStorage.cpp
parent26234d326fe0e9aaa82c253762f89b20101b9bf4 (diff)
downloadsubsurface-91c8a2fa5c897111146bff30ff27763ddb92f929.tar.gz
Prefs: add bool preference cloud_auto_sync [1/3]
With removal of the git_local_only from the preferences (see ae653703a5d3f), the users choice, in the mobile app, was not stored any more in between sessions. This resulted in issue 1725. So, in order to store that user preference, we need a new preference. This is added here, but its not yet hooked up in the app yet. This deals only with the preference handling. And adapted tests are included. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'core/settings/qPrefCloudStorage.cpp')
-rw-r--r--core/settings/qPrefCloudStorage.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/settings/qPrefCloudStorage.cpp b/core/settings/qPrefCloudStorage.cpp
index ef7605d97..8bbd91aec 100644
--- a/core/settings/qPrefCloudStorage.cpp
+++ b/core/settings/qPrefCloudStorage.cpp
@@ -16,6 +16,7 @@ qPrefCloudStorage *qPrefCloudStorage::instance()
void qPrefCloudStorage::loadSync(bool doSync)
{
+ disk_cloud_auto_sync(doSync);
disk_cloud_base_url(doSync);
disk_cloud_storage_email(doSync);
disk_cloud_storage_email_encoded(doSync);
@@ -26,6 +27,8 @@ void qPrefCloudStorage::loadSync(bool doSync)
disk_save_password_local(doSync);
}
+HANDLE_PREFERENCE_BOOL(CloudStorage, "cloud_auto_sync", cloud_auto_sync);
+
void qPrefCloudStorage::set_cloud_base_url(const QString &value)
{
if (value != prefs.cloud_base_url) {