From 5da23065d6e03f62cfa61ec4aa3ea4f22c42fe38 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Tue, 1 Nov 2016 14:42:26 +0100 Subject: Use default prefs for the prefs that where missing This patch fixes all the cases that I didn't checked for the default prefs. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- core/subsurface-qt/SettingsObjectWrapper.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'core/subsurface-qt') diff --git a/core/subsurface-qt/SettingsObjectWrapper.cpp b/core/subsurface-qt/SettingsObjectWrapper.cpp index e8d1e7d61..68fdf195e 100644 --- a/core/subsurface-qt/SettingsObjectWrapper.cpp +++ b/core/subsurface-qt/SettingsObjectWrapper.cpp @@ -2284,18 +2284,18 @@ void SettingsObjectWrapper::load() s.beginGroup("UpdateManager"); prefs.update_manager.dont_check_exists = s.contains("DontCheckForUpdates"); - prefs.update_manager.dont_check_for_updates = s.value("DontCheckForUpdates").toBool(); - prefs.update_manager.last_version_used = copy_string(qPrintable(s.value("LastVersionUsed").toString())); + GET_BOOL("DontCheckForUpdates", update_manager.dont_check_for_updates); + GET_TXT("LastVersionUsed", update_manager.last_version_used); prefs.update_manager.next_check = copy_string(qPrintable(s.value("NextCheck").toDate().toString("dd/MM/yyyy"))); s.endGroup(); s.beginGroup("Language"); - prefs.locale.use_system_language = s.value("UseSystemLanguage").toBool(); - prefs.locale.language = copy_string(qPrintable(s.value("UiLanguage").toString())); - prefs.locale.lang_locale = copy_string(qPrintable(s.value("UiLangLocale").toString())); - prefs.time_format = copy_string(qPrintable(s.value("time_format").toString())); - prefs.date_format = copy_string(qPrintable(s.value("date_format").toString())); - prefs.date_format_short = copy_string(qPrintable(s.value("date_format_short").toString())); + GET_BOOL("UseSystemLanguage", locale.use_system_language); + GET_TXT("UiLanguage", locale.language); + GET_TXT("UiLangLocale", locale.lang_locale); + GET_TXT("time_format", time_format); + GET_TXT("date_format", date_format); + GET_TXT("date_format_short", date_format_short); s.endGroup(); } -- cgit v1.2.3-70-g09d2