Prefs: add bool preference cloud_auto_sync [1/3]

With removal of the git_local_only from the preferences (see
ae653703a5), 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>
This commit is contained in:
Jan Mulder 2018-10-08 16:15:53 +02:00 committed by Dirk Hohndel
parent 26234d326f
commit 91c8a2fa5c
4 changed files with 28 additions and 0 deletions

View file

@ -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) {