core: use set_lang_locale to modify prefs.locale.lang_locale

Do not set prefs.locale_lang_locale directly, but do it
indirectly through qPrefLanguage::set_lang_locale(),
to ensure the file plist is consistent with prefs.

the difference (prefs. contra plist) cause surprises
when restarting mobile (and playing with language).

Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
jan Iversen 2019-02-01 20:34:34 +01:00 committed by Dirk Hohndel
parent 7198b2efc6
commit 573a4a5e2d

View file

@ -466,7 +466,7 @@ QString uiLanguage(QLocale *callerLoc)
else
uiLang = languages[0];
prefs.locale.lang_locale = copy_qstring(uiLang);
qPrefLanguage::set_lang_locale(uiLang);
// there's a stupid Qt bug on MacOS where uiLanguages doesn't give us the country info
if (!uiLang.contains('-') && uiLang != loc.bcp47Name()) {