diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-10-09 15:22:49 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-11-08 13:00:39 +0100 |
commit | e330a9bb44fd5deb86a46934b2b45c1ad1f9f70a (patch) | |
tree | 7c480135f3aaed64b49933e859e7c18c0517afe0 /src/corelib/text/qlocale.cpp | |
parent | 902a5a1ff48bf68af45d6a09fd58bcecb29add6c (diff) |
Replace fallbackUiLocaleData() with fallbackUiLocaleIndex()
This means always initializing globalLocaleData from an entry in the
locale_data array, where in principle the fallbackUiLocale() could be
the system locale, which isn't held in the array. However, no actual
implementation of fallbackUiLocale() uses the system locale (nor is it
clear this would work if one did).
Change-Id: Ie1c5ef3e8a97f21e0d82fa2dfb3cf3eb9e4c8840
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'src/corelib/text/qlocale.cpp')
-rw-r--r-- | src/corelib/text/qlocale.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/text/qlocale.cpp b/src/corelib/text/qlocale.cpp index 6253766fd5..15a65f2203 100644 --- a/src/corelib/text/qlocale.cpp +++ b/src/corelib/text/qlocale.cpp @@ -651,7 +651,7 @@ static void updateSystemPrivate() sys_locale->query(QSystemLocale::LocaleChanged); // Populate global with fallback as basis: - globalLocaleData = *sys_locale->fallbackUiLocaleData(); + globalLocaleData = locale_data[sys_locale->fallbackUiLocaleIndex()]; QVariant res = sys_locale->query(QSystemLocale::LanguageId); if (!res.isNull()) { |