diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-12-30 18:01:58 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-12-30 18:01:58 +0100 |
commit | ecc2a18e1afc1b99df6725066c9ae552d09e90d8 (patch) | |
tree | c897f73483a1622d5e4f18c5cdbff55573881d93 /examples/maildirresource/maildirresource.cpp | |
parent | 84957496800a862aa88bb2e88da0a9b2c4e19dc2 (diff) | |
download | sink-ecc2a18e1afc1b99df6725066c9ae552d09e90d8.tar.gz sink-ecc2a18e1afc1b99df6725066c9ae552d09e90d8.zip |
Centralize where we create the stores
Diffstat (limited to 'examples/maildirresource/maildirresource.cpp')
-rw-r--r-- | examples/maildirresource/maildirresource.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/maildirresource/maildirresource.cpp b/examples/maildirresource/maildirresource.cpp index 273b996..b49a27e 100644 --- a/examples/maildirresource/maildirresource.cpp +++ b/examples/maildirresource/maildirresource.cpp | |||
@@ -212,11 +212,9 @@ KAsync::Job<void> MaildirResource::synchronizeWithSource(Akonadi2::Storage &main | |||
212 | }); | 212 | }); |
213 | } | 213 | } |
214 | 214 | ||
215 | KAsync::Job<void> MaildirResource::replay(const QByteArray &type, const QByteArray &key, const QByteArray &value) | 215 | KAsync::Job<void> MaildirResource::replay(Akonadi2::Storage &synchronizationStore, const QByteArray &type, const QByteArray &key, const QByteArray &value) |
216 | { | 216 | { |
217 | //This results in a deadlock during sync | 217 | auto synchronizationTransaction = synchronizationStore.createTransaction(Akonadi2::Storage::ReadWrite); |
218 | Akonadi2::Storage store(Akonadi2::storageLocation(), mResourceInstanceIdentifier + ".synchronization", Akonadi2::Storage::ReadWrite); | ||
219 | auto synchronizationTransaction = store.createTransaction(Akonadi2::Storage::ReadWrite); | ||
220 | 218 | ||
221 | Trace() << "Replaying " << key << type; | 219 | Trace() << "Replaying " << key << type; |
222 | if (type == ENTITY_TYPE_FOLDER) { | 220 | if (type == ENTITY_TYPE_FOLDER) { |