From 74a861c5617621663b1d5d8a1cd79c7a0eef9d8a Mon Sep 17 00:00:00 2001 From: David Faure Date: Mon, 21 Jun 2021 14:16:23 +0200 Subject: kconfigtest: save/restore XDG_CONFIG_DIRS No impact on the rest of the test, but I was wondering if it might break anything, better restore it just in case. --- autotests/kconfigtest.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autotests/kconfigtest.cpp b/autotests/kconfigtest.cpp index bf7882f0..d8cc417d 100644 --- a/autotests/kconfigtest.cpp +++ b/autotests/kconfigtest.cpp @@ -960,6 +960,7 @@ void KConfigTest::testCascadingWithLocale() #ifdef Q_XDG_PLATFORM QTemporaryDir middleDir; QTemporaryDir globalDir; + const QByteArray oldConfigDirs = qgetenv("XDG_CONFIG_DIRS"); qputenv("XDG_CONFIG_DIRS", qPrintable(middleDir.path() + QLatin1Char(':') + globalDir.path())); const QString globalConfigDir = globalDir.path() + QLatin1Char('/') + s_test_subdir; @@ -999,6 +1000,7 @@ void KConfigTest::testCascadingWithLocale() QCOMPARE(group.readEntry("FromLocal"), QStringLiteral("vrai")); QCOMPARE(group.readEntry("Name"), QStringLiteral("FR")); QCOMPARE(group.readEntry("Other"), QStringLiteral("English Only")); // Global_FR is locally overriden + qputenv("XDG_CONFIG_DIRS", oldConfigDirs); #endif } -- cgit v1.2.1