diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-03-22 16:25:43 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-22 12:01:09 -0700 |
commit | 2dca7d0ce5ba4045732f3fcd6c8a1170b4ad902f (patch) | |
tree | 2ff202978db649c088a1848a00ec7f8c42bcf935 /core/qthelper.cpp | |
parent | 621d00d8919d9ca07082fdf3dfb8118a1345b29d (diff) | |
download | subsurface-2dca7d0ce5ba4045732f3fcd6c8a1170b4ad902f.tar.gz |
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>
Diffstat (limited to 'core/qthelper.cpp')
-rw-r--r-- | core/qthelper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp index 564d4394f..85914767c 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -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 |