mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
locale: store locate to preferences after fixing up mac-weirdness
In uiLanguage() the preferences fields are initialized and there is fixup for a MacOS indiosyncrasy. For some reason the uncorrected value is written to the preferences. Let's store the corrected value instead. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
621d00d891
commit
2dca7d0ce5
1 changed files with 2 additions and 2 deletions
|
@ -471,8 +471,6 @@ QString uiLanguage(QLocale *callerLoc)
|
|||
else
|
||||
uiLang = languages[0];
|
||||
|
||||
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()) {
|
||||
QLocale loc2(loc.bcp47Name());
|
||||
|
@ -488,6 +486,8 @@ QString uiLanguage(QLocale *callerLoc)
|
|||
if (callerLoc)
|
||||
*callerLoc = loc;
|
||||
|
||||
prefs.locale.lang_locale = copy_qstring(uiLang);
|
||||
|
||||
if (!prefs.date_format_override || empty_string(prefs.date_format_short) || empty_string(prefs.date_format)) {
|
||||
// derive our standard date format from what the locale gives us
|
||||
// the short format is fine
|
||||
|
|
Loading…
Reference in a new issue