-void BufferSyncer::mergeBuffersPermanently(BufferId buffer1, BufferId buffer2) {
- if(_lastSeenMsg.contains(buffer2))
- _lastSeenMsg.remove(buffer2);
- emit buffersPermanentlyMerged(buffer1, buffer2);
+void BufferSyncer::initSetMarkerLines(const QVariantList &list)
+{
+ _markerLines.clear();
+ Q_ASSERT(list.count() % 2 == 0);
+ for (int i = 0; i < list.count(); i += 2) {
+ setMarkerLine(list.at(i).value<BufferId>(), list.at(i+1).value<MsgId>());
+ }
+}
+
+
+void BufferSyncer::removeBuffer(BufferId buffer)
+{
+ if (_lastSeenMsg.contains(buffer))
+ _lastSeenMsg.remove(buffer);
+ if (_markerLines.contains(buffer))
+ _markerLines.remove(buffer);
+ SYNC(ARG(buffer))
+ emit bufferRemoved(buffer);
+}
+
+
+void BufferSyncer::mergeBuffersPermanently(BufferId buffer1, BufferId buffer2)
+{
+ if (_lastSeenMsg.contains(buffer2))
+ _lastSeenMsg.remove(buffer2);
+ if (_markerLines.contains(buffer2))
+ _markerLines.remove(buffer2);
+ SYNC(ARG(buffer1), ARG(buffer2))
+ emit buffersPermanentlyMerged(buffer1, buffer2);