From 179183cc388e3e8677ecdb82dac89f4d49570993 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 11 Sep 2015 09:37:38 +0200 Subject: Store entities with revisions --- examples/dummyresource/resourcefactory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/dummyresource') diff --git a/examples/dummyresource/resourcefactory.cpp b/examples/dummyresource/resourcefactory.cpp index cfbcdae..8d84cf8 100644 --- a/examples/dummyresource/resourcefactory.cpp +++ b/examples/dummyresource/resourcefactory.cpp @@ -55,7 +55,7 @@ DummyResource::DummyResource(const QByteArray &instanceIdentifier, const QShared const auto resourceIdentifier = mResourceInstanceIdentifier; auto eventIndexer = new Akonadi2::SimpleProcessor("eventIndexer", [eventFactory, resourceIdentifier](const Akonadi2::PipelineState &state, const Akonadi2::Entity &entity, Akonadi2::Storage::Transaction &transaction) { - Akonadi2::ApplicationDomain::Event event(resourceIdentifier, state.key(), -1, eventFactory->createAdaptor(entity)); + Akonadi2::ApplicationDomain::Event event(resourceIdentifier, Akonadi2::Storage::uidFromKey(state.key()), -1, eventFactory->createAdaptor(entity)); Akonadi2::ApplicationDomain::TypeImplementation::index(event, transaction); index("event.index.rid", event.getProperty("remoteId"), event.identifier(), transaction); }); @@ -67,7 +67,7 @@ DummyResource::DummyResource(const QByteArray &instanceIdentifier, const QShared { auto mailFactory = QSharedPointer::create(); auto mailIndexer = new Akonadi2::SimpleProcessor("mailIndexer", [mailFactory, resourceIdentifier](const Akonadi2::PipelineState &state, const Akonadi2::Entity &entity, Akonadi2::Storage::Transaction &transaction) { - Akonadi2::ApplicationDomain::Mail mail(resourceIdentifier, state.key(), -1, mailFactory->createAdaptor(entity)); + Akonadi2::ApplicationDomain::Mail mail(resourceIdentifier, Akonadi2::Storage::uidFromKey(state.key()), -1, mailFactory->createAdaptor(entity)); Akonadi2::ApplicationDomain::TypeImplementation::index(mail, transaction); index("mail.index.rid", mail.getProperty("remoteId"), mail.identifier(), transaction); }); -- cgit v1.2.3