diff options
author | David Faure <faure@kde.org> | 2021-06-23 12:05:33 +0200 |
---|---|---|
committer | David Faure <faure@kde.org> | 2021-08-03 10:01:15 +0000 |
commit | ed28682265bd95416a98d5ccc6a72e96563f84f3 (patch) | |
tree | f02637dae257a7330b47731257c6811945b448e8 /src/core/kconfigini.cpp | |
parent | dcc5f6529d3008f2cf3a678a4c42d5092b406690 (diff) | |
download | kconfig-ed28682265bd95416a98d5ccc6a72e96563f84f3.tar.gz kconfig-ed28682265bd95416a98d5ccc6a72e96563f84f3.tar.bz2 |
KConfig: fix deletion of an entry that is also in kdeglobals
This is the case where we expected to see Key[$d] in the config file,
and it was somehow broken. When saving, the key was omitted, so when
reloading the kdeglobals key was present again.
Detected when trying to write a unittest for a different patch...
I had to reshuffle the unittest a bit because testThreads calls
testSimple which didn't expect that the "[AAA]" group would actually
be deleted now.
Diffstat (limited to 'src/core/kconfigini.cpp')
-rw-r--r-- | src/core/kconfigini.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/kconfigini.cpp b/src/core/kconfigini.cpp index a67e490f..2792cb4f 100644 --- a/src/core/kconfigini.cpp +++ b/src/core/kconfigini.cpp @@ -437,7 +437,7 @@ bool KConfigIniBackend::writeConfig(const QByteArray &locale, KEntryMap &entryMa } else { KEntryKey defaultKey = key; defaultKey.bDefault = true; - if (!entryMap.contains(defaultKey)) { + if (!entryMap.contains(defaultKey) && !it->bOverridesGlobal) { writeMap.remove(key); // remove the deleted entry if there is no default // qDebug() << "Detected as deleted=>removed:" << key.mGroup << key.mKey << "global=" << bGlobal; } else { |