From 44744e281a56488c7ef257e12ca379ec4ceb2cdd Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 8 Feb 2016 21:34:06 +0100 Subject: Executed database removal in the resource instead of the client. The resource doesn't really notify all clients properly about the removal, but the tests all still pass. --- examples/dummyresource/resourcefactory.cpp | 5 +++++ examples/dummyresource/resourcefactory.h | 1 + 2 files changed, 6 insertions(+) (limited to 'examples') diff --git a/examples/dummyresource/resourcefactory.cpp b/examples/dummyresource/resourcefactory.cpp index 31633d7..36866ec 100644 --- a/examples/dummyresource/resourcefactory.cpp +++ b/examples/dummyresource/resourcefactory.cpp @@ -128,6 +128,11 @@ KAsync::Job DummyResource::replay(Sink::Storage &synchronizationStore, con return KAsync::null(); } +void DummyResource::removeDataFromDisk() +{ + removeFromDisk(mResourceInstanceIdentifier); +} + void DummyResource::removeFromDisk(const QByteArray &instanceIdentifier) { GenericResource::removeFromDisk(instanceIdentifier); diff --git a/examples/dummyresource/resourcefactory.h b/examples/dummyresource/resourcefactory.h index 240bb9f..865f6e5 100644 --- a/examples/dummyresource/resourcefactory.h +++ b/examples/dummyresource/resourcefactory.h @@ -39,6 +39,7 @@ public: DummyResource(const QByteArray &instanceIdentifier, const QSharedPointer &pipeline = QSharedPointer()); KAsync::Job synchronizeWithSource(Sink::Storage &mainStore, Sink::Storage &synchronizationStore) Q_DECL_OVERRIDE; using GenericResource::synchronizeWithSource; + void removeDataFromDisk() Q_DECL_OVERRIDE; static void removeFromDisk(const QByteArray &instanceIdentifier); KAsync::Job inspect(int inspectionType, const QByteArray &inspectionId, const QByteArray &domainType, const QByteArray &entityId, const QByteArray &property, const QVariant &expectedValue) Q_DECL_OVERRIDE; private: -- cgit v1.2.3