diff options
Diffstat (limited to 'autotests')
| -rw-r--r-- | autotests/kconfigtest.cpp | 9 | ||||
| -rw-r--r-- | autotests/kentrymaptest.cpp | 4 | 
2 files changed, 11 insertions, 2 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); diff --git a/autotests/kentrymaptest.cpp b/autotests/kentrymaptest.cpp index 5e39df54..090e497a 100644 --- a/autotests/kentrymaptest.cpp +++ b/autotests/kentrymaptest.cpp @@ -123,11 +123,11 @@ void KEntryMapTest::testDefault()      QCOMPARE(entry1->mValue, entry2->mValue);      // revert entry1 -    map.revertEntry(group1, key1); +    map.revertEntry(group1, key1, EntryOptions());      QCOMPARE(defaultEntry->mValue, entry1->mValue);      // revert entry2, no default --> should be marked as deleted -    map.revertEntry(group1, key2); +    map.revertEntry(group1, key2, EntryOptions());      QCOMPARE(entry2->mValue, QByteArray());      QVERIFY(entry2->bDirty);      QVERIFY(entry2->bReverted);  | 
