From b9790a04eeba664ecdf9ace24911094a71b5f0bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephen=20R=C3=B6ttger?= Date: Tue, 24 Apr 2012 05:29:07 +0200 Subject: 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 Reviewed-by: John Layt --- src/corelib/tools/qlocale_unix.cpp | 2 ++ 1 file changed, 2 insertions(+) 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()); case LocaleChanged: Q_ASSERT(false); + case LanguageId: + return lc_messages.language(); default: break; } -- cgit v1.2.3