diff options
author | Stephen Röttger <stephen.roettger@zero-entropy.de> | 2012-04-24 05:29:07 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-24 21:45:00 +0200 |
commit | b9790a04eeba664ecdf9ace24911094a71b5f0bd (patch) | |
tree | 0874a58a2bd0262787468b5200759325f9a89607 /src | |
parent | f948bb3c6c6d14f5d5f209f9be720998a81df145 (diff) |
Fix locale issue on unix systems
QSystemLocale::query() was missing the LanguageId QueryType. Therefore
QSystemLocale::fallbackLocale() was always used as default language,
which reads environment variables in the order: LC_ALL -> LC_NUMERIC ->
LANG. The correct behaviour is to read LC_ALL -> LC_MESSAGES -> LANG.
This leads to problems for users that want to use english language, but
non-english localization features (date, number formats etc.)
Change-Id: I4310537dac8622a3dd79231fbad58e22f20ca262
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: John Layt <jlayt@kde.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/tools/qlocale_unix.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/tools/qlocale_unix.cpp b/src/corelib/tools/qlocale_unix.cpp index e88c511ae9..5f7a9da95d 100644 --- a/src/corelib/tools/qlocale_unix.cpp +++ b/src/corelib/tools/qlocale_unix.cpp @@ -244,6 +244,8 @@ QVariant QSystemLocale::query(QueryType type, QVariant in) const return lc_messages.createSeparatedList(in.value<QStringList>()); case LocaleChanged: Q_ASSERT(false); + case LanguageId: + return lc_messages.language(); default: break; } |