aboutsummaryrefslogtreecommitdiff
path: root/src/core/kconfigdata.cpp
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2021-06-23 12:05:33 +0200
committerDavid Faure <faure@kde.org>2021-08-03 10:01:15 +0000
commited28682265bd95416a98d5ccc6a72e96563f84f3 (patch)
treef02637dae257a7330b47731257c6811945b448e8 /src/core/kconfigdata.cpp
parentdcc5f6529d3008f2cf3a678a4c42d5092b406690 (diff)
downloadkconfig-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/kconfigdata.cpp')
-rw-r--r--src/core/kconfigdata.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/kconfigdata.cpp b/src/core/kconfigdata.cpp
index b479a598..0d6a7bb9 100644
--- a/src/core/kconfigdata.cpp
+++ b/src/core/kconfigdata.cpp
@@ -18,8 +18,9 @@ QDebug operator<<(QDebug dbg, const KEntryKey &key)
QDebug operator<<(QDebug dbg, const KEntry &entry)
{
- dbg.nospace() << "[" << entry.mValue << (entry.bDirty ? " dirty" : "") << (entry.bGlobal ? " global" : "") << (entry.bImmutable ? " immutable" : "")
- << (entry.bDeleted ? " deleted" : "") << (entry.bReverted ? " reverted" : "") << (entry.bExpand ? " expand" : "") << "]";
+ dbg.nospace() << "[" << entry.mValue << (entry.bDirty ? " dirty" : "") << (entry.bGlobal ? " global" : "")
+ << (entry.bOverridesGlobal ? " overrides global" : "") << (entry.bImmutable ? " immutable" : "") << (entry.bDeleted ? " deleted" : "")
+ << (entry.bReverted ? " reverted" : "") << (entry.bExpand ? " expand" : "") << "]";
return dbg.space();
}
@@ -164,7 +165,7 @@ bool KEntryMap::setEntry(const QByteArray &group, const QByteArray &key, const Q
}
}
if (it.value() != e) {
- // qDebug() << "changing" << k << "from" << e.mValue << "to" << value;
+ // qDebug() << "changing" << k << "from" << it.value().mValue << "to" << value << e;
it.value() = e;
if (k.bDefault) {
KEntryKey nonDefaultKey(k);