diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-04 12:40:24 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-04 12:40:24 +0100 |
commit | ba94c4300c52dd80774ed7affc2ef9b4508cb7be (patch) | |
tree | 3c8bf6ce042a4544e81901d901a3a3759d0a128a /common/queryrunner.cpp | |
parent | 98b682acb8c57cadaea5ff0ac6709d21a591b97b (diff) | |
download | sink-ba94c4300c52dd80774ed7affc2ef9b4508cb7be.tar.gz sink-ba94c4300c52dd80774ed7affc2ef9b4508cb7be.zip |
Don't expose the live query flag directly.
Diffstat (limited to 'common/queryrunner.cpp')
-rw-r--r-- | common/queryrunner.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/queryrunner.cpp b/common/queryrunner.cpp index 1eacb8e..780b341 100644 --- a/common/queryrunner.cpp +++ b/common/queryrunner.cpp | |||
@@ -72,7 +72,7 @@ QueryRunner<DomainType>::QueryRunner(const Sink::Query &query, const Sink::Resou | |||
72 | const QByteArray parentId = parent ? parent->identifier() : QByteArray(); | 72 | const QByteArray parentId = parent ? parent->identifier() : QByteArray(); |
73 | SinkTrace() << "Running fetcher. Offset: " << mOffset[parentId] << " Batchsize: " << mBatchSize; | 73 | SinkTrace() << "Running fetcher. Offset: " << mOffset[parentId] << " Batchsize: " << mBatchSize; |
74 | auto resultProvider = mResultProvider; | 74 | auto resultProvider = mResultProvider; |
75 | if (query.synchronousQuery) { | 75 | if (query.synchronousQuery()) { |
76 | QueryWorker<DomainType> worker(query, mResourceContext, bufferType, mResultTransformation); | 76 | QueryWorker<DomainType> worker(query, mResourceContext, bufferType, mResultTransformation); |
77 | worker.executeInitialQuery(query, parent, *resultProvider, mOffset[parentId], mBatchSize); | 77 | worker.executeInitialQuery(query, parent, *resultProvider, mOffset[parentId], mBatchSize); |
78 | resultProvider->initialResultSetComplete(parent); | 78 | resultProvider->initialResultSetComplete(parent); |
@@ -94,7 +94,7 @@ QueryRunner<DomainType>::QueryRunner(const Sink::Query &query, const Sink::Resou | |||
94 | } | 94 | } |
95 | mOffset[parentId] += newRevisionAndReplayedEntities.second; | 95 | mOffset[parentId] += newRevisionAndReplayedEntities.second; |
96 | // Only send the revision replayed information if we're connected to the resource, there's no need to start the resource otherwise. | 96 | // Only send the revision replayed information if we're connected to the resource, there's no need to start the resource otherwise. |
97 | if (query.liveQuery) { | 97 | if (query.liveQuery()) { |
98 | mResourceAccess->sendRevisionReplayedCommand(newRevisionAndReplayedEntities.first); | 98 | mResourceAccess->sendRevisionReplayedCommand(newRevisionAndReplayedEntities.first); |
99 | } | 99 | } |
100 | resultProvider->setRevision(newRevisionAndReplayedEntities.first); | 100 | resultProvider->setRevision(newRevisionAndReplayedEntities.first); |
@@ -105,8 +105,8 @@ QueryRunner<DomainType>::QueryRunner(const Sink::Query &query, const Sink::Resou | |||
105 | }); | 105 | }); |
106 | 106 | ||
107 | // In case of a live query we keep the runner for as long alive as the result provider exists | 107 | // In case of a live query we keep the runner for as long alive as the result provider exists |
108 | if (query.liveQuery) { | 108 | if (query.liveQuery()) { |
109 | Q_ASSERT(!query.synchronousQuery); | 109 | Q_ASSERT(!query.synchronousQuery()); |
110 | // Incremental updates are always loaded directly, leaving it up to the result to discard the changes if they are not interesting | 110 | // Incremental updates are always loaded directly, leaving it up to the result to discard the changes if they are not interesting |
111 | setQuery([=]() -> KAsync::Job<void> { | 111 | setQuery([=]() -> KAsync::Job<void> { |
112 | auto resultProvider = mResultProvider; | 112 | auto resultProvider = mResultProvider; |