X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclient.cpp;h=b9515e78012edd7d2fe5d4e77443c91d902e6c5f;hp=be2c89401eecd4e26ad30781d284028f164b32e3;hb=bd1a18355495899b5ce3003599a67e1ea7ca01cc;hpb=78f804479b1278b89adf09e41a8cc33236562430 diff --git a/src/client/client.cpp b/src/client/client.cpp index be2c8940..b9515e78 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -285,6 +285,7 @@ void Client::setSyncedToCore() { _bufferSyncer = new BufferSyncer(this); connect(bufferSyncer(), SIGNAL(lastSeenSet(BufferId, const QDateTime &)), this, SLOT(updateLastSeen(BufferId, const QDateTime &))); connect(bufferSyncer(), SIGNAL(bufferRemoved(BufferId)), this, SLOT(bufferRemoved(BufferId))); + connect(bufferSyncer(), SIGNAL(bufferRenamed(BufferId, QString)), this, SLOT(bufferRenamed(BufferId, QString))); signalProxy()->synchronize(bufferSyncer()); _syncedToCore = true; @@ -479,3 +480,10 @@ void Client::bufferRemoved(BufferId bufferId) { buff->deleteLater(); } } + +void Client::bufferRenamed(BufferId bufferId, const QString &newName) { + QModelIndex bufferIndex = networkModel()->bufferIndex(bufferId); + if(bufferIndex.isValid()) { + networkModel()->setData(bufferIndex, newName, Qt::DisplayRole); + } +}