X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclient.cpp;h=07b3c26550da1b13c3e174ac90c6ff39bfb0fafa;hp=84d28ec09adc94c1ee02aa08c7a339821d409131;hb=580662426b8b734566b37de61deccf5b89970c6e;hpb=4f2cf796763079da1079751bbdac9b905689ec11 diff --git a/src/client/client.cpp b/src/client/client.cpp index 84d28ec0..07b3c265 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -52,6 +52,7 @@ #include QPointer Client::instanceptr = 0; +Quassel::Features Client::_coreFeatures = 0; /*** Initialization/destruction ***/ @@ -159,6 +160,10 @@ AbstractUi *Client::mainUi() { return instance()->_mainUi; } +void Client::setCoreFeatures(Quassel::Features features) { + _coreFeatures = features; +} + bool Client::isConnected() { return instance()->_connected; } @@ -311,6 +316,7 @@ void Client::setSyncedToCore() { Q_ASSERT(!_bufferSyncer); _bufferSyncer = new BufferSyncer(this); connect(bufferSyncer(), SIGNAL(lastSeenMsgSet(BufferId, MsgId)), _networkModel, SLOT(setLastSeenMsgId(BufferId, MsgId))); + connect(bufferSyncer(), SIGNAL(markerLineSet(BufferId,MsgId)), _networkModel, SLOT(setMarkerLineMsgId(BufferId,MsgId))); connect(bufferSyncer(), SIGNAL(bufferRemoved(BufferId)), this, SLOT(bufferRemoved(BufferId))); connect(bufferSyncer(), SIGNAL(bufferRenamed(BufferId, QString)), this, SLOT(bufferRenamed(BufferId, QString))); connect(bufferSyncer(), SIGNAL(buffersPermanentlyMerged(BufferId, BufferId)), this, SLOT(buffersPermanentlyMerged(BufferId, BufferId))); @@ -377,6 +383,8 @@ void Client::disconnectFromCore() { void Client::setDisconnectedFromCore() { _connected = false; + _coreFeatures = 0; + emit disconnected(); emit coreConnectionStateChanged(false); @@ -461,9 +469,13 @@ void Client::recvMessage(const Message &msg) { } void Client::setBufferLastSeenMsg(BufferId id, const MsgId &msgId) { - if(!bufferSyncer()) - return; - bufferSyncer()->requestSetLastSeenMsg(id, msgId); + if(bufferSyncer()) + bufferSyncer()->requestSetLastSeenMsg(id, msgId); +} + +void Client::setBufferMarkerLine(BufferId id, const MsgId &msgId) { + if(bufferSyncer()) + bufferSyncer()->requestSetMarkerLine(id, msgId); } void Client::removeBuffer(BufferId id) {