From cae180036e94e56a4754d59847e972c8935f07e6 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 29 Mar 2016 21:19:12 -0500 Subject: 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 --- subsurface-mobile-main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'subsurface-mobile-main.cpp') 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; -- cgit v1.2.3-70-g09d2