From 67e83aadde8db2bb1293cee61e8c6306a4ffcca0 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 18 Jan 2016 18:36:41 +0100 Subject: Working resource inspection --- examples/dummyresource/resourcefactory.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'examples/dummyresource/resourcefactory.cpp') diff --git a/examples/dummyresource/resourcefactory.cpp b/examples/dummyresource/resourcefactory.cpp index 27d5f17..c43b5e6 100644 --- a/examples/dummyresource/resourcefactory.cpp +++ b/examples/dummyresource/resourcefactory.cpp @@ -134,21 +134,17 @@ void DummyResource::removeFromDisk(const QByteArray &instanceIdentifier) Akonadi2::Storage(Akonadi2::storageLocation(), instanceIdentifier + ".synchronization", Akonadi2::Storage::ReadWrite).removeFromDisk(); } -KAsync::Job DummyResource::inspect(int inspectionType, const QByteArray &domainType, const QByteArray &entityId, const QByteArray &property, const QVariant &expectedValue) +KAsync::Job DummyResource::inspect(int inspectionType, const QByteArray &inspectionId, const QByteArray &domainType, const QByteArray &entityId, const QByteArray &property, const QVariant &expectedValue) { Trace() << "Inspecting " << inspectionType << domainType << entityId << property << expectedValue; if (property == "testInspection") { - Akonadi2::ResourceNotification n; - n.type = Akonadi2::NotificationType_Inspection; if (expectedValue.toBool()) { //Success - n.code = 0; - emit notify(n); + return KAsync::null(); } else { //Failure - n.code = 1; - emit notify(n); + return KAsync::error(1, "Failed."); } } return KAsync::null(); -- cgit v1.2.3