Temporarily fixed the bug where the backlog would be displayed multiple times.
[quassel.git] / src / client / client.cpp
index 28df087..d6f243f 100644 (file)
@@ -326,6 +326,8 @@ void Client::syncToCore(const QVariant &coreState) {
   
   instance()->connectedToCore = true;
   updateCoreConnectionProgress();
   
   instance()->connectedToCore = true;
   updateCoreConnectionProgress();
+
+  emit connected(); // FIXME EgS: moved here from updateCoreConnectionProgress
 }
 
 void Client::updateCoreConnectionProgress() {
 }
 
 void Client::updateCoreConnectionProgress() {
@@ -379,12 +381,12 @@ void Client::updateCoreConnectionProgress() {
   }
 
   emit coreConnectionProgress(1,1);
   }
 
   emit coreConnectionProgress(1,1);
-  emit connected();
+  //emit connected(); // FIXME EgS: This caused the double backlog... but... we shouldn't be calling this whole function all the time...
 
   foreach(NetworkInfo *net, networkInfos()) {
     disconnect(net, 0, this, SLOT(updateCoreConnectionProgress()));
   }
 
   foreach(NetworkInfo *net, networkInfos()) {
     disconnect(net, 0, this, SLOT(updateCoreConnectionProgress()));
   }
-  
+
   // signalProxy()->dumpProxyStats();
 }
 
   // signalProxy()->dumpProxyStats();
 }
 
@@ -441,6 +443,7 @@ void Client::networkConnected(uint netid) {
   //Buffer *b = buffer(id);
   //b->setActive(true);
 
   //Buffer *b = buffer(id);
   //b->setActive(true);
 
+  // FIXME EgS: do we really need to call updateCoreConnectionProgress whenever a new network is connected?
   NetworkInfo *netinfo = new NetworkInfo(netid, signalProxy(), this);
   connect(netinfo, SIGNAL(initDone()), this, SLOT(updateCoreConnectionProgress()));
   connect(netinfo, SIGNAL(ircUserInitDone()), this, SLOT(updateCoreConnectionProgress()));
   NetworkInfo *netinfo = new NetworkInfo(netid, signalProxy(), this);
   connect(netinfo, SIGNAL(initDone()), this, SLOT(updateCoreConnectionProgress()));
   connect(netinfo, SIGNAL(ircUserInitDone()), this, SLOT(updateCoreConnectionProgress()));