X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2Fclient.cpp;h=b9515e78012edd7d2fe5d4e77443c91d902e6c5f;hb=b709cbc76fc0bd0f14839b4c04ba8caf78d775f1;hp=be2c89401eecd4e26ad30781d284028f164b32e3;hpb=87f95344178f652061d2c27ad6eda60d738a2041;p=quassel.git 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); + } +}