From ba94c4300c52dd80774ed7affc2ef9b4508cb7be Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 4 Nov 2016 12:40:24 +0100 Subject: Don't expose the live query flag directly. --- common/queryrunner.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'common/queryrunner.cpp') 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::QueryRunner(const Sink::Query &query, const Sink::Resou const QByteArray parentId = parent ? parent->identifier() : QByteArray(); SinkTrace() << "Running fetcher. Offset: " << mOffset[parentId] << " Batchsize: " << mBatchSize; auto resultProvider = mResultProvider; - if (query.synchronousQuery) { + if (query.synchronousQuery()) { QueryWorker worker(query, mResourceContext, bufferType, mResultTransformation); worker.executeInitialQuery(query, parent, *resultProvider, mOffset[parentId], mBatchSize); resultProvider->initialResultSetComplete(parent); @@ -94,7 +94,7 @@ QueryRunner::QueryRunner(const Sink::Query &query, const Sink::Resou } mOffset[parentId] += newRevisionAndReplayedEntities.second; // Only send the revision replayed information if we're connected to the resource, there's no need to start the resource otherwise. - if (query.liveQuery) { + if (query.liveQuery()) { mResourceAccess->sendRevisionReplayedCommand(newRevisionAndReplayedEntities.first); } resultProvider->setRevision(newRevisionAndReplayedEntities.first); @@ -105,8 +105,8 @@ QueryRunner::QueryRunner(const Sink::Query &query, const Sink::Resou }); // In case of a live query we keep the runner for as long alive as the result provider exists - if (query.liveQuery) { - Q_ASSERT(!query.synchronousQuery); + if (query.liveQuery()) { + Q_ASSERT(!query.synchronousQuery()); // Incremental updates are always loaded directly, leaving it up to the result to discard the changes if they are not interesting setQuery([=]() -> KAsync::Job { auto resultProvider = mResultProvider; -- cgit v1.2.3