diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-03-21 23:01:49 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-21 21:06:36 -0700 |
commit | 2db7d5cc23658b59e307d825ca031639f0bb76cc (patch) | |
tree | c310c33aadb41d2f2d12ec3e7bcef5c09774a389 /core | |
parent | f9b8d16a0d49c8c70f6b3b01d61284ec2c502c9b (diff) | |
download | subsurface-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>
Diffstat (limited to 'core')
-rw-r--r-- | core/qthelper.cpp | 2 |
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()) { |