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>
This commit is contained in:
parent
f948bb3c6c
commit
b9790a04ee
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user