summaryrefslogtreecommitdiffstats
path: root/examples/dummyresource/resourcefactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dummyresource/resourcefactory.cpp')
-rw-r--r--examples/dummyresource/resourcefactory.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/dummyresource/resourcefactory.cpp b/examples/dummyresource/resourcefactory.cpp
index e61881e..73af70a 100644
--- a/examples/dummyresource/resourcefactory.cpp
+++ b/examples/dummyresource/resourcefactory.cpp
@@ -66,8 +66,8 @@ void DummyResource::configurePipeline(Akonadi2::Pipeline *pipeline)
66KAsync::Job<void> DummyResource::synchronizeWithSource(Akonadi2::Pipeline *pipeline) 66KAsync::Job<void> DummyResource::synchronizeWithSource(Akonadi2::Pipeline *pipeline)
67{ 67{
68 return KAsync::start<void>([this, pipeline](KAsync::Future<void> &f) { 68 return KAsync::start<void>([this, pipeline](KAsync::Future<void> &f) {
69 //TODO use a read-only transaction during the complete sync to sync against a defined revision
70 auto storage = QSharedPointer<Akonadi2::Storage>::create(Akonadi2::Store::storageLocation(), mResourceInstanceIdentifier); 69 auto storage = QSharedPointer<Akonadi2::Storage>::create(Akonadi2::Store::storageLocation(), mResourceInstanceIdentifier);
70 storage->startTransaction(Akonadi2::Storage::ReadOnly);
71 71
72 Index uidIndex(Akonadi2::Store::storageLocation(), mResourceInstanceIdentifier + ".index.uid", Akonadi2::Storage::ReadOnly); 72 Index uidIndex(Akonadi2::Store::storageLocation(), mResourceInstanceIdentifier + ".index.uid", Akonadi2::Storage::ReadOnly);
73 73
@@ -117,6 +117,7 @@ KAsync::Job<void> DummyResource::synchronizeWithSource(Akonadi2::Pipeline *pipel
117 //TODO diff and create modification if necessary 117 //TODO diff and create modification if necessary
118 } 118 }
119 } 119 }
120 storage->abortTransaction();
120 //TODO find items to remove 121 //TODO find items to remove
121 f.setFinished(); 122 f.setFinished();
122 }); 123 });