aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-29 21:43:37 -0500
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-29 21:43:37 -0500
commit94a549e76759285476eb170665831e2b4ba59808 (patch)
tree95221b336626c7470bb35e62225426c6f02f1a78
parentcae180036e94e56a4754d59847e972c8935f07e6 (diff)
downloadsubsurface-94a549e76759285476eb170665831e2b4ba59808.tar.gz
QML UI: brute force password saving
This is embarrassing. I should have done this in the first place instead of trying to hack around it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--subsurface-core/qthelper.cpp5
-rw-r--r--subsurface-mobile-main.cpp5
2 files changed, 5 insertions, 5 deletions
diff --git a/subsurface-core/qthelper.cpp b/subsurface-core/qthelper.cpp
index fae5e0130..e103b44e5 100644
--- a/subsurface-core/qthelper.cpp
+++ b/subsurface-core/qthelper.cpp
@@ -1480,7 +1480,12 @@ void loadPreferences()
s.beginGroup("CloudStorage");
GET_TXT("email", cloud_storage_email);
+#ifndef SUBSURFACE_MOBILE
GET_BOOL("save_password_local", save_password_local);
+#else
+ // always save the password in Subsurface-mobile
+ prefs.save_password_local = true;
+#endif
if (prefs.save_password_local) { // GET_TEXT macro is not a single statement
GET_TXT("password", cloud_storage_password);
}
diff --git a/subsurface-mobile-main.cpp b/subsurface-mobile-main.cpp
index 74ba5477f..940c9225b 100644
--- a/subsurface-mobile-main.cpp
+++ b/subsurface-mobile-main.cpp
@@ -60,13 +60,8 @@ int main(int argc, char **argv)
parse_xml_init();
taglist_init_global();
init_ui();
- // load the preferences and make sure to load the password
- // the mobile UI makes no sense without that
- prefs.save_password_local = true;
loadPreferences();
-
// some hard coded settings
- prefs.save_password_local = true; // in case somehow the loaded prefs reset that
prefs.animation_speed = 0; // we render the profile to pixmap, no animations
// always show the divecomputer reported ceiling in red