summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-03-21 23:01:49 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-21 21:06:36 -0700
commit2db7d5cc23658b59e307d825ca031639f0bb76cc (patch)
treec310c33aadb41d2f2d12ec3e7bcef5c09774a389
parentf9b8d16a0d49c8c70f6b3b01d61284ec2c502c9b (diff)
downloadsubsurface-2db7d5cc23658b59e307d825ca031639f0bb76cc.tar.gz
Revert "core: use set_lang_locale to modify prefs.locale.lang_locale"
This reverts commit 573a4a5e2da9531fbaa9e82da57131edc691a851. The commit broke setting the language in the desktop preferences: Instead of setting the locale in the prefs struct, the locale is set via qPrefLanguage. However, that saves the default language (extracted from the system) to disk. Now when the language is read from the preferences, we get that default value. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r--core/qthelper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp
index 05612a4ce..564d4394f 100644
--- a/core/qthelper.cpp
+++ b/core/qthelper.cpp
@@ -471,7 +471,7 @@ QString uiLanguage(QLocale *callerLoc)
else
uiLang = languages[0];
- qPrefLanguage::set_lang_locale(uiLang);
+ prefs.locale.lang_locale = copy_qstring(uiLang);
// there's a stupid Qt bug on MacOS where uiLanguages doesn't give us the country info
if (!uiLang.contains('-') && uiLang != loc.bcp47Name()) {