- NetworkInfo *netinfo = new NetworkInfo(netid, signalProxy(), this);
- connect(netinfo, SIGNAL(initDone()), this, SLOT(updateCoreConnectionProgress()));
- connect(netinfo, SIGNAL(ircUserInitDone()), this, SLOT(updateCoreConnectionProgress()));
- connect(netinfo, SIGNAL(ircChannelInitDone()), this, SLOT(updateCoreConnectionProgress()));
+ NetworkInfo *netinfo = new NetworkInfo(netid, this);
+ netinfo->setProxy(signalProxy());
+ networkModel()->attachNetworkInfo(netinfo);
+
+ if(!isConnected()) {
+ connect(netinfo, SIGNAL(initDone()), this, SLOT(updateCoreConnectionProgress()));
+ connect(netinfo, SIGNAL(ircUserInitDone()), this, SLOT(updateCoreConnectionProgress()));
+ connect(netinfo, SIGNAL(ircChannelInitDone()), this, SLOT(updateCoreConnectionProgress()));
+ }
+ connect(netinfo, SIGNAL(ircChannelAdded(QString)), this, SLOT(ircChannelAdded(QString)));
+ connect(netinfo, SIGNAL(destroyed()), this, SLOT(networkInfoDestroyed()));