aboutsummaryrefslogtreecommitdiff
path: root/autotests/kconfigtest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'autotests/kconfigtest.cpp')
-rw-r--r--autotests/kconfigtest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/autotests/kconfigtest.cpp b/autotests/kconfigtest.cpp
index 32d3eef8..410b5b80 100644
--- a/autotests/kconfigtest.cpp
+++ b/autotests/kconfigtest.cpp
@@ -1926,6 +1926,15 @@ void KConfigTest::testNotify()
QCOMPARE(watcherSpy[0][0].value<KConfigGroup>().name(), QStringLiteral("TopLevelGroup"));
QCOMPARE(watcherSpy[0][1].value<QByteArrayList>(), QByteArrayList({"entryA"}));
+ //revert to default an entry
+ watcherSpy.clear();
+ myConfigGroup.revertToDefault("entryA", KConfig::Persistent | KConfig::Notify);
+ config.sync();
+ watcherSpy.wait();
+ QCOMPARE(watcherSpy.count(), 1);
+ QCOMPARE(watcherSpy[0][0].value<KConfigGroup>().name(), QStringLiteral("TopLevelGroup"));
+ QCOMPARE(watcherSpy[0][1].value<QByteArrayList>(), QByteArrayList({"entryA"}));
+
//deleting a group, should notify that every entry in that group has changed
watcherSpy.clear();
myConfigGroup.deleteGroup("aSubGroup", KConfig::Persistent | KConfig::Notify);