diff options
author | Martin Gräßlin <mgraesslin@kde.org> | 2014-06-05 14:05:44 +0200 |
---|---|---|
committer | Thomas Braxton <kde.braxton@gmail.com> | 2014-06-12 17:48:21 -0500 |
commit | 69c203156d21385a8c263096cb35600e85a5c604 (patch) | |
tree | 38a69b65bea0a85ef43df011194ce4e0742aec55 /src | |
parent | ac6703215ba5e152379173ba503f5ba3bd7e8a85 (diff) | |
download | kconfig-69c203156d21385a8c263096cb35600e85a5c604.tar.gz kconfig-69c203156d21385a8c263096cb35600e85a5c604.tar.bz2 |
Fix locale-aware reading in KDesktopFile
The underlying KConfig used QLocale::name() for getting the locale
aware part. But this returns "de_DE" while the desktop files store
"de".
In addition it constructs a QLocale object instead of using the
system locale. This has the advantage that the usage of
QLocale::setDafault() gets honored by KConfig.
REVIEW: 118564
Diffstat (limited to 'src')
-rw-r--r-- | src/core/kconfig.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/kconfig.cpp b/src/core/kconfig.cpp index 89e92333..a2598f8e 100644 --- a/src/core/kconfig.cpp +++ b/src/core/kconfig.cpp @@ -95,7 +95,7 @@ KConfigPrivate::KConfigPrivate(KConfig::OpenFlags flags, // mappingsRegistered = true; // } - setLocale(QLocale::system().name()); + setLocale(QLocale().name().split(QStringLiteral("_")).at(0)); } bool KConfigPrivate::lockLocal() |