summaryrefslogtreecommitdiffstats
path: root/common/genericresource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/genericresource.cpp')
-rw-r--r--common/genericresource.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/genericresource.cpp b/common/genericresource.cpp
index 42153ec..29acce4 100644
--- a/common/genericresource.cpp
+++ b/common/genericresource.cpp
@@ -282,7 +282,9 @@ GenericResource::GenericResource(const QByteArray &resourceInstanceIdentifier, c
282 QObject::connect(mProcessor, &CommandProcessor::error, [this](int errorCode, const QString &msg) { onProcessorError(errorCode, msg); }); 282 QObject::connect(mProcessor, &CommandProcessor::error, [this](int errorCode, const QString &msg) { onProcessorError(errorCode, msg); });
283 QObject::connect(mPipeline.data(), &Pipeline::revisionUpdated, this, &Resource::revisionUpdated); 283 QObject::connect(mPipeline.data(), &Pipeline::revisionUpdated, this, &Resource::revisionUpdated);
284 mSourceChangeReplay = new ChangeReplay(resourceInstanceIdentifier, [this](const QByteArray &type, const QByteArray &key, const QByteArray &value) { 284 mSourceChangeReplay = new ChangeReplay(resourceInstanceIdentifier, [this](const QByteArray &type, const QByteArray &key, const QByteArray &value) {
285 return this->replay(type, key, value); 285 //This results in a deadlock when a sync is in progress and we try to create a second writing transaction (which is why we turn changereplay off during the sync)
286 auto synchronizationStore = QSharedPointer<Akonadi2::Storage>::create(Akonadi2::storageLocation(), mResourceInstanceIdentifier + ".synchronization", Akonadi2::Storage::ReadWrite);
287 return this->replay(*synchronizationStore, type, key, value).then<void>([synchronizationStore](){});
286 }); 288 });
287 enableChangeReplay(true); 289 enableChangeReplay(true);
288 mClientLowerBoundRevision = mPipeline->cleanedUpRevision(); 290 mClientLowerBoundRevision = mPipeline->cleanedUpRevision();
@@ -317,7 +319,7 @@ void GenericResource::addType(const QByteArray &type, DomainTypeAdaptorFactoryIn
317 mPipeline->setAdaptorFactory(type, factory); 319 mPipeline->setAdaptorFactory(type, factory);
318} 320}
319 321
320KAsync::Job<void> GenericResource::replay(const QByteArray &type, const QByteArray &key, const QByteArray &value) 322KAsync::Job<void> GenericResource::replay(Akonadi2::Storage &synchronizationStore, const QByteArray &type, const QByteArray &key, const QByteArray &value)
321{ 323{
322 return KAsync::null<void>(); 324 return KAsync::null<void>();
323} 325}