diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-03-02 12:27:09 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-03-02 12:27:09 +0100 |
commit | be652c12dfa5162d952f5226de453e1a29957c3a (patch) | |
tree | 9f54e2daab45a08d54e9ec8fec798b8f968988ed /common/synchronizer.cpp | |
parent | 60cb0a4607e8fe0317920d7c3d110f508186859e (diff) | |
download | sink-0.1.0.tar.gz sink-0.1.0.zip |
Port away from syncStartv0.1.0
Diffstat (limited to 'common/synchronizer.cpp')
-rw-r--r-- | common/synchronizer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/synchronizer.cpp b/common/synchronizer.cpp index 57c5d90..b147615 100644 --- a/common/synchronizer.cpp +++ b/common/synchronizer.cpp | |||
@@ -289,7 +289,7 @@ void Synchronizer::flushComplete(const QByteArray &flushId) | |||
289 | KAsync::Job<void> Synchronizer::processRequest(const SyncRequest &request) | 289 | KAsync::Job<void> Synchronizer::processRequest(const SyncRequest &request) |
290 | { | 290 | { |
291 | if (request.options & SyncRequest::RequestFlush) { | 291 | if (request.options & SyncRequest::RequestFlush) { |
292 | return KAsync::syncStart<void>([=] { | 292 | return KAsync::start([=] { |
293 | //Trigger a flush and record original request without flush option | 293 | //Trigger a flush and record original request without flush option |
294 | auto modifiedRequest = request; | 294 | auto modifiedRequest = request; |
295 | modifiedRequest.options = SyncRequest::NoOptions; | 295 | modifiedRequest.options = SyncRequest::NoOptions; |
@@ -309,7 +309,7 @@ KAsync::Job<void> Synchronizer::processRequest(const SyncRequest &request) | |||
309 | enqueueCommand(Sink::Commands::FlushCommand, BufferUtils::extractBuffer(fbb)); | 309 | enqueueCommand(Sink::Commands::FlushCommand, BufferUtils::extractBuffer(fbb)); |
310 | }); | 310 | }); |
311 | } else if (request.requestType == Synchronizer::SyncRequest::Synchronization) { | 311 | } else if (request.requestType == Synchronizer::SyncRequest::Synchronization) { |
312 | return KAsync::syncStart<void>([this, request] { | 312 | return KAsync::start([this, request] { |
313 | Sink::Notification n; | 313 | Sink::Notification n; |
314 | n.id = request.requestId; | 314 | n.id = request.requestId; |
315 | n.type = Notification::Status; | 315 | n.type = Notification::Status; |
@@ -343,7 +343,7 @@ KAsync::Job<void> Synchronizer::processRequest(const SyncRequest &request) | |||
343 | } | 343 | } |
344 | }); | 344 | }); |
345 | } else if (request.requestType == Synchronizer::SyncRequest::Flush) { | 345 | } else if (request.requestType == Synchronizer::SyncRequest::Flush) { |
346 | return KAsync::syncStart<void>([=] { | 346 | return KAsync::start([=] { |
347 | Q_ASSERT(!request.requestId.isEmpty()); | 347 | Q_ASSERT(!request.requestId.isEmpty()); |
348 | //FIXME it looks like this is emitted before the replay actually finishes | 348 | //FIXME it looks like this is emitted before the replay actually finishes |
349 | if (request.flushType == Flush::FlushReplayQueue) { | 349 | if (request.flushType == Flush::FlushReplayQueue) { |
@@ -387,7 +387,7 @@ KAsync::Job<void> Synchronizer::processSyncQueue() | |||
387 | } | 387 | } |
388 | 388 | ||
389 | const auto request = mSyncRequestQueue.takeFirst(); | 389 | const auto request = mSyncRequestQueue.takeFirst(); |
390 | return KAsync::syncStart<void>([this] { | 390 | return KAsync::start([this] { |
391 | mMessageQueue->startTransaction(); | 391 | mMessageQueue->startTransaction(); |
392 | mEntityStore->startTransaction(Sink::Storage::DataStore::ReadOnly); | 392 | mEntityStore->startTransaction(Sink::Storage::DataStore::ReadOnly); |
393 | mSyncInProgress = true; | 393 | mSyncInProgress = true; |