diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-04-27 11:20:09 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-04-27 11:20:09 +0200 |
commit | c5595c71f6db276513d5158ccef23c2c7d8d0834 (patch) | |
tree | 76276a0d8808c06383cd9c7b0357d0957a9c13c5 /examples/dummyresource/facade.cpp | |
parent | e0a0b6473b87194df89e126c6e68a37560a22d35 (diff) | |
download | sink-c5595c71f6db276513d5158ccef23c2c7d8d0834.tar.gz sink-c5595c71f6db276513d5158ccef23c2c7d8d0834.zip |
cleanup
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 | ||