diff options
Diffstat (limited to 'examples/dummyresource/facade.cpp')
-rw-r--r-- | examples/dummyresource/facade.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/dummyresource/facade.cpp b/examples/dummyresource/facade.cpp index c1e7a64..176d489 100644 --- a/examples/dummyresource/facade.cpp +++ b/examples/dummyresource/facade.cpp | |||
@@ -129,7 +129,7 @@ void DummyResourceFacade::readValue(QSharedPointer<Akonadi2::Storage> storage, c | |||
129 | 129 | ||
130 | Async::Job<qint64> DummyResourceFacade::load(const Akonadi2::Query &query, const QSharedPointer<Akonadi2::ResultProvider<Akonadi2::ApplicationDomain::Event::Ptr> > &resultProvider, qint64 oldRevision, qint64 newRevision) | 130 | Async::Job<qint64> DummyResourceFacade::load(const Akonadi2::Query &query, const QSharedPointer<Akonadi2::ResultProvider<Akonadi2::ApplicationDomain::Event::Ptr> > &resultProvider, qint64 oldRevision, qint64 newRevision) |
131 | { | 131 | { |
132 | return Async::start<qint64>([=](Async::Future<qint64> &future) { | 132 | return Async::start<qint64>([=]() { |
133 | //Now that the sync is complete we can execute the query | 133 | //Now that the sync is complete we can execute the query |
134 | const auto preparedQuery = prepareQuery(query); | 134 | const auto preparedQuery = prepareQuery(query); |
135 | 135 | ||
@@ -167,8 +167,7 @@ Async::Job<qint64> DummyResourceFacade::load(const Akonadi2::Query &query, const | |||
167 | } | 167 | } |
168 | } | 168 | } |
169 | storage->abortTransaction(); | 169 | storage->abortTransaction(); |
170 | future.setValue(revision); | 170 | return revision; |
171 | future.setFinished(); | ||
172 | }); | 171 | }); |
173 | } | 172 | } |
174 | 173 | ||