summaryrefslogtreecommitdiffstats
path: root/common/commandprocessor.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-03-28 10:10:41 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-03-28 10:10:41 +0200
commit85beb06912698af92b5d9e9a489a72773164451d (patch)
tree44c054871d785c57d4de946671c74da7264a1e03 /common/commandprocessor.cpp
parent547e5e29cbfc12474ab45768ff0d9342882b2633 (diff)
downloadsink-85beb06912698af92b5d9e9a489a72773164451d.tar.gz
sink-85beb06912698af92b5d9e9a489a72773164451d.zip
Only send notifications about being connected if we did something
against the source. We used to replay no changes and then claim the resource was online.
Diffstat (limited to 'common/commandprocessor.cpp')
-rw-r--r--common/commandprocessor.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/common/commandprocessor.cpp b/common/commandprocessor.cpp
index 2d9e93c..3507ef1 100644
--- a/common/commandprocessor.cpp
+++ b/common/commandprocessor.cpp
@@ -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}