summaryrefslogtreecommitdiffstats
path: root/common/commandprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/commandprocessor.cpp')
-rw-r--r--common/commandprocessor.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/common/commandprocessor.cpp b/common/commandprocessor.cpp
index 33e2f81..3507ef1 100644
--- a/common/commandprocessor.cpp
+++ b/common/commandprocessor.cpp
@@ -245,9 +245,9 @@ KAsync::Job<void> CommandProcessor::processQueue(MessageQueue *queue)
245 } 245 }
246 } 246 }
247 if (queue->isEmpty()) { 247 if (queue->isEmpty()) {
248 return KAsync::value<KAsync::ControlFlowFlag>(KAsync::Break); 248 return KAsync::Break;
249 } else { 249 } else {
250 return KAsync::value<KAsync::ControlFlowFlag>(KAsync::Continue); 250 return KAsync::Continue;
251 } 251 }
252 }); 252 });
253 })) 253 }))
@@ -295,24 +295,6 @@ void CommandProcessor::setSynchronizer(const QSharedPointer<Synchronizer> &synch
295 mSynchronizer->setup([this](int commandId, const QByteArray &data) { 295 mSynchronizer->setup([this](int commandId, const QByteArray &data) {
296 enqueueCommand(mSynchronizerQueue, commandId, data); 296 enqueueCommand(mSynchronizerQueue, commandId, data);
297 }, mSynchronizerQueue); 297 }, mSynchronizerQueue);
298
299 QObject::connect(mSynchronizer.data(), &Synchronizer::replayingChanges, [this]() {
300 Sink::Notification n;
301 n.id = "changereplay";
302 n.type = Notification::Status;
303 n.message = "Replaying changes.";
304 n.code = ApplicationDomain::BusyStatus;
305 emit notify(n);
306 });
307 QObject::connect(mSynchronizer.data(), &Synchronizer::changesReplayed, [this]() {
308 Sink::Notification n;
309 n.id = "changereplay";
310 n.type = Notification::Status;
311 n.message = "All changes have been replayed.";
312 n.code = ApplicationDomain::ConnectedStatus;
313 emit notify(n);
314 });
315
316 QObject::connect(mSynchronizer.data(), &Synchronizer::notify, this, &CommandProcessor::notify); 298 QObject::connect(mSynchronizer.data(), &Synchronizer::notify, this, &CommandProcessor::notify);
317 setOldestUsedRevision(mSynchronizer->getLastReplayedRevision()); 299 setOldestUsedRevision(mSynchronizer->getLastReplayedRevision());
318} 300}