projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added core and client handlers for buffer removal
[quassel.git]
/
src
/
client
/
client.cpp
diff --git
a/src/client/client.cpp
b/src/client/client.cpp
index
a2473b1
..
e3a9281
100644
(file)
--- a/
src/client/client.cpp
+++ b/
src/client/client.cpp
@@
-284,6
+284,7
@@
void Client::setSyncedToCore() {
Q_ASSERT(!_bufferSyncer);
_bufferSyncer = new BufferSyncer(this);
connect(bufferSyncer(), SIGNAL(lastSeenSet(BufferId, const QDateTime &)), this, SLOT(updateLastSeen(BufferId, const QDateTime &)));
Q_ASSERT(!_bufferSyncer);
_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)));
signalProxy()->synchronize(bufferSyncer());
_syncedToCore = true;
signalProxy()->synchronize(bufferSyncer());
_syncedToCore = true;
@@
-457,4
+458,11
@@
void Client::setBufferLastSeen(BufferId id, const QDateTime &lastSeen) {
bufferSyncer()->requestSetLastSeen(id, lastSeen);
}
bufferSyncer()->requestSetLastSeen(id, lastSeen);
}
-
+void Client::bufferRemoved(BufferId bufferId) {
+ networkModel()->removeBuffer(bufferId);
+ if(_buffers.contains(bufferId)) {
+ Buffer *buff = _buffers.take(bufferId);
+ disconnect(buff, 0, this, 0);
+ buff->deleteLater();
+ }
+}