diff options
author | Martin Gräßlin <mgraesslin@kde.org> | 2014-06-05 14:05:44 +0200 |
---|---|---|
committer | Martin Gräßlin <mgraesslin@kde.org> | 2014-06-12 07:06:07 +0200 |
commit | 988f09bb051dca0437ecec431ee44ed5b4a560d8 (patch) | |
tree | e86c5d2303b0fc1ee4c68ac3dd59ba326c464af1 /src/core/kconfig.cpp | |
parent | 0ed55dfa5d25bdcbef24f1b06be34467b620ae99 (diff) | |
download | kconfig-988f09bb051dca0437ecec431ee44ed5b4a560d8.tar.gz kconfig-988f09bb051dca0437ecec431ee44ed5b4a560d8.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/core/kconfig.cpp')
-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 ea9746c0..cfa6c207 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() |