From 573a4a5e2da9531fbaa9e82da57131edc691a851 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Fri, 1 Feb 2019 20:34:34 +0100 Subject: 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 --- core/qthelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/qthelper.cpp b/core/qthelper.cpp index 6d33be383..b8e4822a3 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -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()) { -- cgit v1.2.3-70-g09d2