aboutsummaryrefslogtreecommitdiff
path: root/autotests/kconfigtest.cpp
diff options
context:
space:
mode:
authorMartin Gräßlin <mgraesslin@kde.org>2014-06-05 14:05:44 +0200
committerThomas Braxton <kde.braxton@gmail.com>2014-06-12 17:48:21 -0500
commit69c203156d21385a8c263096cb35600e85a5c604 (patch)
tree38a69b65bea0a85ef43df011194ce4e0742aec55 /autotests/kconfigtest.cpp
parentac6703215ba5e152379173ba503f5ba3bd7e8a85 (diff)
downloadkconfig-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 'autotests/kconfigtest.cpp')
-rw-r--r--autotests/kconfigtest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/autotests/kconfigtest.cpp b/autotests/kconfigtest.cpp
index 2b6de0d7..a8482b70 100644
--- a/autotests/kconfigtest.cpp
+++ b/autotests/kconfigtest.cpp
@@ -21,6 +21,7 @@
#undef QT_NO_CAST_FROM_BYTEARRAY
#include "kconfigtest.h"
+#include "helper.h"
#include <QtTest/QtTest>
#include <qtemporarydir.h>
@@ -927,6 +928,8 @@ void KConfigTest::testCascadingWithLocale()
void KConfigTest::testMerge()
{
+ DefaultLocale defaultLocale;
+ QLocale::setDefault(QLocale::c());
KConfig config(TEST_SUBDIR "mergetest", KConfig::SimpleConfig);
KConfigGroup cg = config.group("some group");