From: Marcus Eggenberger Date: Tue, 31 Mar 2009 00:11:32 +0000 (+0200) Subject: fixing some more issues with initial backlog fetching X-Git-Tag: 0.5-rc1~241 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=09cc362cca645192f04aaac58953e1f1bace6d59;hp=7fc418e5841a1633f651e08a34ccd2123ba6e0db fixing some more issues with initial backlog fetching --- diff --git a/src/client/clientbacklogmanager.cpp b/src/client/clientbacklogmanager.cpp index 77538429..00d49d20 100644 --- a/src/client/clientbacklogmanager.cpp +++ b/src/client/clientbacklogmanager.cpp @@ -103,9 +103,11 @@ void ClientBacklogManager::requestInitialBacklog() { BufferIdList ClientBacklogManager::filterNewBufferIds(const BufferIdList &bufferIds) { BufferIdList newBuffers; + QSet availableBuffers = Client::networkModel()->allBufferIds().toSet(); foreach(BufferId bufferId, bufferIds) { - if(!_buffersRequested.contains(bufferId)) - newBuffers << bufferId; + if(_buffersRequested.contains(bufferId) || !availableBuffers.contains(bufferId)) + continue; + newBuffers << bufferId; } return newBuffers; } diff --git a/src/client/clientbufferviewmanager.cpp b/src/client/clientbufferviewmanager.cpp index d7cd837f..315c2a8e 100644 --- a/src/client/clientbufferviewmanager.cpp +++ b/src/client/clientbufferviewmanager.cpp @@ -20,7 +20,6 @@ #include "clientbufferviewmanager.h" -#include "bufferviewoverlay.h" #include "clientbufferviewconfig.h" ClientBufferViewManager::ClientBufferViewManager(SignalProxy *proxy, QObject *parent) @@ -54,7 +53,7 @@ void ClientBufferViewManager::waitForConfigInit() { connect(config, SIGNAL(initDone()), this, SLOT(configInitBarrier())); } if(initialized) - emit viewsInitialized(); + QMetaObject::invokeMethod(this, "viewsInitialized", Qt::QueuedConnection); } void ClientBufferViewManager::configInitBarrier() { @@ -67,5 +66,5 @@ void ClientBufferViewManager::configInitBarrier() { initialized &= config->isInitialized(); } if(initialized) - emit viewsInitialized(); + QMetaObject::invokeMethod(this, "viewsInitialized", Qt::QueuedConnection); }