From 81d5d82b7bfb1a7a1cfe44b8d33befe9b31a2099 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 10 Aug 2016 13:27:03 -0300 Subject: 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 Signed-off-by: Dirk Hohndel --- desktop-widgets/subsurfacewebservices.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'desktop-widgets/subsurfacewebservices.cpp') diff --git a/desktop-widgets/subsurfacewebservices.cpp b/desktop-widgets/subsurfacewebservices.cpp index bd798c729..68b7737c3 100644 --- a/desktop-widgets/subsurfacewebservices.cpp +++ b/desktop-widgets/subsurfacewebservices.cpp @@ -8,6 +8,7 @@ #include "desktop-widgets/maintab.h" #include "core/display.h" #include "core/membuffer.h" +#include "core/subsurface-qt/SettingsObjectWrapper.h" #include #include "core/cloudstorage.h" @@ -436,7 +437,8 @@ void SubsurfaceWebServices::buttonClicked(QAbstractButton *button) QSettings s; QString qDialogUid = ui.userID->text().toUpper(); bool qSaveUid = ui.saveUidLocal->checkState(); - set_save_userid_local(qSaveUid); + SettingsObjectWrapper::instance()->cloud_storage->setSaveUserIdLocal(qSaveUid); + if (qSaveUid) { QString qSettingUid = s.value("subsurface_webservice_uid").toString(); QString qFileUid = QString(prefs.userid); -- cgit v1.2.3-70-g09d2