aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-mobile-main.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-29 21:19:12 -0500
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-29 21:23:28 -0500
commitcae180036e94e56a4754d59847e972c8935f07e6 (patch)
tree6097223f37a874986e78ebc1fa5575c5ed1bc4dc /subsurface-mobile-main.cpp
parent5e8930a1798364ecc6c47997af6e9bc83b0325de (diff)
downloadsubsurface-cae180036e94e56a4754d59847e972c8935f07e6.tar.gz
QML UI: really force passwords to be saved
The logic looked so easy, but the preference needs to be hard coded twice because there are two scenarios: - new install, make sure we load the password from settings (so it needs to be hard coded BEFORE we load preferences) - update where previously for some reason the user stored that they didn't want to store the password, so we need to also hard code it after the settings were loaded Looks odd, but that should do the trick. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-mobile-main.cpp')
-rw-r--r--subsurface-mobile-main.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/subsurface-mobile-main.cpp b/subsurface-mobile-main.cpp
index 999ad57ee..74ba5477f 100644
--- a/subsurface-mobile-main.cpp
+++ b/subsurface-mobile-main.cpp
@@ -60,11 +60,14 @@ 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; // the mobile UI makes no sense without that
- prefs.animation_speed = 0;
+ 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
prefs.dcceiling = 1;