aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2016-11-01 14:42:26 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-11-01 09:39:17 -0700
commit5da23065d6e03f62cfa61ec4aa3ea4f22c42fe38 (patch)
tree9f2911ab53c97bce102cec48d4febceefbef7f8c
parent1dddf731ee84b8b6921d4f25a15cf58276457be8 (diff)
downloadsubsurface-5da23065d6e03f62cfa61ec4aa3ea4f22c42fe38.tar.gz
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 <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--core/subsurface-qt/SettingsObjectWrapper.cpp16
1 files changed, 8 insertions, 8 deletions
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();
}