Fix QLocale::system() and uiLanguages() for the mobile platforms
On iOS, it was no longer using the Cocoa specific code needed to get the locale and uiLanguages information so this functionality is brought back as it was accidently lost. In addition, this has a side-effect of fixing a problem with Android versions below API 24 where it has no UiLanguages functionality so it gets the information based on the system locale as a fallback. Fixes: QTBUG-81307 Fixes: QTBUG-81357 Change-Id: I1709675b5bd5e9cedefb99eaec28279f20a347a4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
d0e9e5a36e
commit
0b28f1e3ba
@ -4463,6 +4463,8 @@ QStringList QLocale::uiLanguages() const
|
||||
for (const auto entry : qAsConst(uiLanguages))
|
||||
locales.append(QLocale(entry));
|
||||
}
|
||||
if (locales.isEmpty())
|
||||
locales.append(systemLocale()->fallbackUiLocale());
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ SOURCES += \
|
||||
NO_PCH_SOURCES += text/qstring_compat.cpp
|
||||
false: SOURCES += $$NO_PCH_SOURCES # Hack for QtCreator
|
||||
|
||||
!nacl:macos: {
|
||||
!nacl:darwin: {
|
||||
SOURCES += text/qlocale_mac.mm
|
||||
}
|
||||
else:unix {
|
||||
|
Loading…
x
Reference in New Issue
Block a user