X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fbuffersyncer.cpp;h=82fe0da04a9f78b2eee48ed3c20777e32a979dfa;hp=f05d16376d867d6ae620712143d1c76f44154fc7;hb=cf0e5a5e8d6b27cd377b594a4342a7b493f815b0;hpb=f824db0e31b54969e0b7fa0b5405b1e9173d482c diff --git a/src/common/buffersyncer.cpp b/src/common/buffersyncer.cpp index f05d1637..82fe0da0 100644 --- a/src/common/buffersyncer.cpp +++ b/src/common/buffersyncer.cpp @@ -20,6 +20,7 @@ #include "buffersyncer.h" +INIT_SYNCABLE_OBJECT(BufferSyncer) BufferSyncer::BufferSyncer(QObject *parent) : SyncableObject(parent) { @@ -44,6 +45,7 @@ bool BufferSyncer::setLastSeenMsg(BufferId buffer, const MsgId &msgId) { const MsgId oldLastSeenMsg = lastSeenMsg(buffer); if(!oldLastSeenMsg.isValid() || oldLastSeenMsg < msgId) { _lastSeenMsg[buffer] = msgId; + SYNC(ARG(buffer), ARG(msgId)) emit lastSeenMsgSet(buffer, msgId); return true; } @@ -72,12 +74,13 @@ void BufferSyncer::initSetLastSeenMsg(const QVariantList &list) { void BufferSyncer::removeBuffer(BufferId buffer) { if(_lastSeenMsg.contains(buffer)) _lastSeenMsg.remove(buffer); + SYNC(ARG(buffer)) emit bufferRemoved(buffer); } - void BufferSyncer::mergeBuffersPermanently(BufferId buffer1, BufferId buffer2) { if(_lastSeenMsg.contains(buffer2)) _lastSeenMsg.remove(buffer2); + SYNC(ARG(buffer1), ARG(buffer2)) emit buffersPermanentlyMerged(buffer1, buffer2); }