X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fnetworkmodel.cpp;h=4f702ac478c36a638d73e37bd119ac0aa6a853a9;hp=12e51e5f8ba169a841214a365a748bc29ba7ca4d;hb=da791527a453a98e0fc800336fee4022ec3d4207;hpb=d424e746952f9821cf1c015f4b0fad0e1b169680 diff --git a/src/client/networkmodel.cpp b/src/client/networkmodel.cpp index 12e51e5f..4f702ac4 100644 --- a/src/client/networkmodel.cpp +++ b/src/client/networkmodel.cpp @@ -228,7 +228,8 @@ void BufferItem::removeUserFromCategory(IrcUser *ircUser) { } - if(!success || success) { + if(!success) { + qDebug() << "didn't find User:" << ircUser << (quint64)ircUser; qDebug() << "==== Childlist for Item:" << this << id() << bufferName() << "===="; for(int i = 0; i < childCount(); i++) { categoryItem = qobject_cast(child(i)); @@ -283,8 +284,16 @@ quint64 NetworkItem::id() const { return _networkId.toInt(); } +void NetworkItem::setActive(bool connected) { + Q_UNUSED(connected); + emit dataChanged(); +} + bool NetworkItem::isActive() const { - return _network; + if(_network) + return _network->isConnected(); + else + return false; } QString NetworkItem::networkName() const { @@ -320,6 +329,9 @@ void NetworkItem::attachNetwork(Network *network) { this, SLOT(setCurrentServer(QString))); connect(network, SIGNAL(ircChannelAdded(QString)), this, SLOT(attachIrcChannel(QString))); + connect(network, SIGNAL(connectedSet(bool)), + this, SLOT(setActive(bool))); + // FIXME: connect this and that... emit dataChanged();