summaryrefslogtreecommitdiffstats
path: root/common/queryrunner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/queryrunner.cpp')
-rw-r--r--common/queryrunner.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/queryrunner.cpp b/common/queryrunner.cpp
index 63b5bcf..a62c64c 100644
--- a/common/queryrunner.cpp
+++ b/common/queryrunner.cpp
@@ -75,7 +75,7 @@ QueryRunner<DomainType>::QueryRunner(const Sink::Query &query, const Sink::Resou
75{ 75{
76 Trace() << "Starting query"; 76 Trace() << "Starting query";
77 //We delegate loading of initial data to the result provider, os it can decide for itself what it needs to load. 77 //We delegate loading of initial data to the result provider, os it can decide for itself what it needs to load.
78 mResultProvider->setFetcher([this, query, instanceIdentifier, factory, bufferType](const typename DomainType::Ptr &parent) { 78 mResultProvider->setFetcher([=](const typename DomainType::Ptr &parent) {
79 Trace() << "Running fetcher"; 79 Trace() << "Running fetcher";
80 auto resultProvider = mResultProvider; 80 auto resultProvider = mResultProvider;
81 async::run<qint64>([query, instanceIdentifier, factory, bufferType, parent, resultProvider]() -> qint64 { 81 async::run<qint64>([query, instanceIdentifier, factory, bufferType, parent, resultProvider]() -> qint64 {
@@ -94,10 +94,10 @@ QueryRunner<DomainType>::QueryRunner(const Sink::Query &query, const Sink::Resou
94 // In case of a live query we keep the runner for as long alive as the result provider exists 94 // In case of a live query we keep the runner for as long alive as the result provider exists
95 if (query.liveQuery) { 95 if (query.liveQuery) {
96 //Incremental updates are always loaded directly, leaving it up to the result to discard the changes if they are not interesting 96 //Incremental updates are always loaded directly, leaving it up to the result to discard the changes if they are not interesting
97 setQuery([this, query, instanceIdentifier, factory, bufferType] () -> KAsync::Job<void> { 97 setQuery([=] () -> KAsync::Job<void> {
98 auto resultProvider = mResultProvider; 98 auto resultProvider = mResultProvider;
99 return async::run<qint64>([query, instanceIdentifier, factory, bufferType, resultProvider]() -> qint64 {
100 QueryWorker<DomainType> worker(query, instanceIdentifier, factory, bufferType); 99 QueryWorker<DomainType> worker(query, instanceIdentifier, factory, bufferType);
100 return async::run<qint64>([=]() -> qint64 {
101 const qint64 newRevision = worker.executeIncrementalQuery(query, *resultProvider); 101 const qint64 newRevision = worker.executeIncrementalQuery(query, *resultProvider);
102 return newRevision; 102 return newRevision;
103 }) 103 })