diff options
author | Tomaz Canabrava <tomaz.canabrava@gmail.com> | 2016-08-27 22:13:33 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-08-27 22:37:15 -0700 |
commit | 0a6f6b4382a35402cdfd792487a82c4e83b3a3b0 (patch) | |
tree | 21519e278df6586976900e10f37bb060a1d6f1f2 /core/qthelper.cpp | |
parent | 270864d073359f783fbb9cbe17c583d6b88cb8ae (diff) | |
download | subsurface-0a6f6b4382a35402cdfd792487a82c4e83b3a3b0.tar.gz |
Settings update: Fix missing groups and Language initialization
There's one function named uiLanguage() that should return
the current uiLanguage() that subsurface is running, but
it actually sets a whole lot of preferences, I think
that the general idea of that function is okay, but it seems
broken for me.
still, I used it to load the correct language from the preferences
since it's what this function is currently doing right now.
Also, a lot of missing groups where added.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/qthelper.cpp')
-rw-r--r-- | core/qthelper.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp index a986a68c6..f34547882 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -481,6 +481,9 @@ extern "C" const char *subsurface_user_agent() return strdup(qPrintable(uA)); } +/* TOOD: Move this to SettingsObjectWrapper, and also fix this complexity. + * gezus. + */ QString uiLanguage(QLocale *callerLoc) { QString shortDateFormat; @@ -489,6 +492,7 @@ QString uiLanguage(QLocale *callerLoc) QSettings s; QVariant v; s.beginGroup("Language"); + GET_BOOL("UseSystemLanguage", locale.use_system_language); if (!s.value("UseSystemLanguage", true).toBool()) { loc = QLocale(s.value("UiLanguage", QLocale().uiLanguages().first()).toString()); |