summaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt/SettingsObjectWrapper.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@gmail.com>2016-08-10 13:27:03 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-08-27 10:55:40 -0700
commit81d5d82b7bfb1a7a1cfe44b8d33befe9b31a2099 (patch)
tree31392ef07c43c9ac68ca95805b4865c5859c0848 /core/subsurface-qt/SettingsObjectWrapper.cpp
parent048379cc2b56257be4a435bb707d8a18c9958371 (diff)
downloadsubsurface-81d5d82b7bfb1a7a1cfe44b8d33befe9b31a2099.tar.gz
Settings update: Clean up save user id local
So, prefs.save_userid_local is being set outside of a preferences set (it's set to true and false while loading the files via xml or git) and because of that I had to bypass a few method calls. When something triggers a preferences change, the application will be notified that the preferences changed, thing that I couldn't do while reading the xml or git because that should be local-only. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/subsurface-qt/SettingsObjectWrapper.cpp')
-rw-r--r--core/subsurface-qt/SettingsObjectWrapper.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/core/subsurface-qt/SettingsObjectWrapper.cpp b/core/subsurface-qt/SettingsObjectWrapper.cpp
index b0e552bf2..fe012c9b9 100644
--- a/core/subsurface-qt/SettingsObjectWrapper.cpp
+++ b/core/subsurface-qt/SettingsObjectWrapper.cpp
@@ -811,6 +811,17 @@ void CloudStorageSettings::setBackgroundSync(bool value)
emit backgroundSyncChanged(value);
}
+void CloudStorageSettings::setSaveUserIdLocal(short int value)
+{
+ prefs.save_userid_local = value;
+ emit saveUserIdLocalChanged(value);
+}
+
+short int CloudStorageSettings::saveUserIdLocal() const
+{
+ return prefs.save_userid_local;
+}
+
void CloudStorageSettings::setBaseUrl(const QString& value)
{
free((void*)prefs.cloud_base_url);
@@ -1621,17 +1632,6 @@ QObject(parent),
{
}
-void SettingsObjectWrapper::setSaveUserIdLocal(short int value)
-{
- Q_UNUSED(value);
- //TODO: Find where this is stored on the preferences.
-}
-
-short int SettingsObjectWrapper::saveUserIdLocal() const
-{
- return prefs.save_userid_local;
-}
-
SettingsObjectWrapper* SettingsObjectWrapper::instance()
{
static SettingsObjectWrapper settings;