summaryrefslogtreecommitdiffstats
path: root/core/settings/qPrefCloudStorage.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-06 15:15:19 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-06 16:13:44 -0700
commite71b049498eaae05f7686445be320e90ca2f630e (patch)
tree335174bac350b3f1aaf18db58addcab619bba992 /core/settings/qPrefCloudStorage.cpp
parentd88f86579372d356a7fd33e9fadb38a76b44c757 (diff)
downloadsubsurface-e71b049498eaae05f7686445be320e90ca2f630e.tar.gz
qPref: only save settings that aren't the default
This brings us back to the previous behavior. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/settings/qPrefCloudStorage.cpp')
-rw-r--r--core/settings/qPrefCloudStorage.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/settings/qPrefCloudStorage.cpp b/core/settings/qPrefCloudStorage.cpp
index 9392a24c0..dc12ad633 100644
--- a/core/settings/qPrefCloudStorage.cpp
+++ b/core/settings/qPrefCloudStorage.cpp
@@ -45,7 +45,7 @@ void qPrefCloudStorage::set_cloud_base_url(const QString &value)
void qPrefCloudStorage::disk_cloud_base_url(bool doSync)
{
if (doSync) {
- qPrefPrivate::propSetValue(group + "/cloud_base_url", prefs.cloud_base_url);
+ qPrefPrivate::propSetValue(group + "/cloud_base_url", prefs.cloud_base_url, default_prefs.cloud_base_url);
} else {
prefs.cloud_base_url = copy_qstring(qPrefPrivate::propValue(group + "/cloud_base_url", default_prefs.cloud_base_url).toString());
qPrefPrivate::copy_txt(&prefs.cloud_git_url, QString(prefs.cloud_base_url) + "/git");
@@ -79,7 +79,7 @@ void qPrefCloudStorage::disk_cloud_storage_password(bool doSync)
{
if (doSync) {
if (prefs.save_password_local)
- qPrefPrivate::propSetValue(group + "/password", prefs.cloud_storage_password);
+ qPrefPrivate::propSetValue(group + "/password", prefs.cloud_storage_password, default_prefs.cloud_storage_password);
} else {
prefs.cloud_storage_password = copy_qstring(qPrefPrivate::propValue(group + "/password", default_prefs.cloud_storage_password).toString());
}
@@ -102,7 +102,7 @@ void qPrefCloudStorage::disk_userid(bool doSync)
{
if (doSync) {
// always save in new position (part of cloud storage group)
- qPrefPrivate::propSetValue(group + "subsurface_webservice_uid", prefs.userid);
+ qPrefPrivate::propSetValue(group + "subsurface_webservice_uid", prefs.userid, default_prefs.userid);
} else {
//WARNING: UserId was stored outside of any group.
// try to read from new location, if it fails read from old location
@@ -120,5 +120,5 @@ bool qPrefCloudStorage::loadFromCloud(const QString& email)
}
void qPrefCloudStorage::set_loadFromCloud(const QString& email, bool done)
{
- qPrefPrivate::propSetValue(QString("loadFromCloud") + email, done);
+ qPrefPrivate::propSetValue(QString("loadFromCloud") + email, done, "");
}