diff options
Diffstat (limited to 'dummyresource/facade.cpp')
-rw-r--r-- | dummyresource/facade.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dummyresource/facade.cpp b/dummyresource/facade.cpp index 1aaec68..fcce871 100644 --- a/dummyresource/facade.cpp +++ b/dummyresource/facade.cpp | |||
@@ -115,16 +115,16 @@ static std::function<bool(const std::string &key, DummyEvent const *buffer, Akon | |||
115 | return preparedQuery; | 115 | return preparedQuery; |
116 | } | 116 | } |
117 | 117 | ||
118 | Async::Job<void> DummyResourceFacade::synchronizeResource(bool sync) | 118 | Async::Job<void> DummyResourceFacade::synchronizeResource(bool sync, bool processAll) |
119 | { | 119 | { |
120 | //TODO check if a sync is necessary | 120 | //TODO check if a sync is necessary |
121 | //TODO Only sync what was requested | 121 | //TODO Only sync what was requested |
122 | //TODO timeout | 122 | //TODO timeout |
123 | 123 | ||
124 | if (sync) { | 124 | if (sync || processAll) { |
125 | return Async::start<void>([=](Async::Future<void> &future) { | 125 | return Async::start<void>([=](Async::Future<void> &future) { |
126 | mResourceAccess->open(); | 126 | mResourceAccess->open(); |
127 | mResourceAccess->synchronizeResource().then<void>([&future](Async::Future<void> &f) { | 127 | mResourceAccess->synchronizeResource(sync, processAll).then<void>([&future](Async::Future<void> &f) { |
128 | future.setFinished(); | 128 | future.setFinished(); |
129 | f.setFinished(); | 129 | f.setFinished(); |
130 | }).exec(); | 130 | }).exec(); |
@@ -195,7 +195,7 @@ void DummyResourceFacade::readValue(QSharedPointer<Akonadi2::Storage> storage, c | |||
195 | 195 | ||
196 | Async::Job<void> DummyResourceFacade::load(const Akonadi2::Query &query, const std::function<void(const Akonadi2::Domain::Event::Ptr &)> &resultCallback) | 196 | Async::Job<void> DummyResourceFacade::load(const Akonadi2::Query &query, const std::function<void(const Akonadi2::Domain::Event::Ptr &)> &resultCallback) |
197 | { | 197 | { |
198 | return synchronizeResource(query.syncOnDemand).then<void>([=](Async::Future<void> &future) { | 198 | return synchronizeResource(query.syncOnDemand, query.processAll).then<void>([=](Async::Future<void> &future) { |
199 | //Now that the sync is complete we can execute the query | 199 | //Now that the sync is complete we can execute the query |
200 | const auto preparedQuery = prepareQuery(query); | 200 | const auto preparedQuery = prepareQuery(query); |
201 | 201 | ||