X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fnetworkmodel.cpp;h=c79717911b65d4f82045e217410ab7dba7aa344b;hp=940feb7f06edfa4413c3b5f83943e887350c2ea9;hb=52a7b4d0f289f075aa386445a47d876743bcb6d0;hpb=1066294489c2469323a2813b63ae4653d148bbc7 diff --git a/src/client/networkmodel.cpp b/src/client/networkmodel.cpp index 940feb7f..c7971791 100644 --- a/src/client/networkmodel.cpp +++ b/src/client/networkmodel.cpp @@ -27,7 +27,6 @@ #include "signalproxy.h" #include "network.h" #include "ircchannel.h" -#include "ircuser.h" #include "buffersettings.h" @@ -255,23 +254,23 @@ void BufferItem::removeUserFromCategory(IrcUser *ircUser) { UserCategoryItem *categoryItem = 0; for(int i = 0; i < childCount(); i++) { categoryItem = qobject_cast(child(i)); - if(success = categoryItem->removeUser(ircUser)) { + if((success = categoryItem->removeUser(ircUser))) { if(categoryItem->childCount() == 0) removeChild(i); break; } } - if(!success) { - qDebug() << "didn't find User:" << ircUser << qHash(ircUser); - qDebug() << "==== Childlist for Item:" << this << id() << bufferName() << "===="; - for(int i = 0; i < childCount(); i++) { - categoryItem = qobject_cast(child(i)); - categoryItem->dumpChildList(); - } - qDebug() << "==== End Of Childlist for Item:" << this << id() << bufferName() << "===="; - } - Q_ASSERT(success); +// if(!success) { +// qDebug() << "didn't find User:" << ircUser << qHash(ircUser); +// qDebug() << "==== Childlist for Item:" << this << id() << bufferName() << "===="; +// for(int i = 0; i < childCount(); i++) { +// categoryItem = qobject_cast(child(i)); +// categoryItem->dumpChildList(); +// } +// qDebug() << "==== End Of Childlist for Item:" << this << id() << bufferName() << "===="; +// } +// Q_ASSERT(success); } void BufferItem::userModeChanged(IrcUser *ircUser) { @@ -313,6 +312,11 @@ QString BufferItem::toolTip(int column) const { toolTip.append(tr("Topic: %1").arg(_topic)); } } + if(_ircChannel) { + QString channelMode = _ircChannel->channelModeString(); // channelModeString is compiled on the fly -> thus cache the result + if(!channelMode.isEmpty()) + toolTip.append(tr("Mode: %1").arg(channelMode)); + } } else { toolTip.append(tr("Not active
Double-click to join")); } @@ -565,14 +569,6 @@ bool IrcUserItem::isActive() const { return false; } -IrcUser *IrcUserItem::ircUser() { - return _ircUser; -} - -quint64 IrcUserItem::id() const { - return _id; -} - QVariant IrcUserItem::data(int column, int role) const { switch(role) { case NetworkModel::ItemActiveRole: