X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fnetworkmodel.cpp;h=7aa2082ff531d1f6d25577957b6f7ab4b0060e93;hp=0582d44c6776c48671cae4fa694567219b2dc0e8;hb=602dff8eeccc5460051f5e34e877e16bb4eb0341;hpb=56607f81246f04db3a0e71c9a8757d7f75d6cfcf diff --git a/src/client/networkmodel.cpp b/src/client/networkmodel.cpp index 0582d44c..7aa2082f 100644 --- a/src/client/networkmodel.cpp +++ b/src/client/networkmodel.cpp @@ -55,21 +55,13 @@ BufferItem::BufferItem(BufferInfo bufferInfo, AbstractTreeItem *parent) setFlags(flags); } -const BufferInfo &BufferItem::bufferInfo() const { - return _bufferInfo; -} - quint64 BufferItem::id() const { return qHash(bufferInfo().bufferId()); } -bool BufferItem::isStatusBuffer() const { - return bufferType() == BufferInfo::StatusBuffer; -} - -BufferInfo::Type BufferItem::bufferType() const { - return bufferInfo().type(); -} +// bool BufferItem::isStatusBuffer() const { +// return bufferType() == BufferInfo::StatusBuffer; +// } bool BufferItem::isActive() const { if(bufferType() == BufferInfo::ChannelBuffer) @@ -423,8 +415,6 @@ void NetworkItem::attachNetwork(Network *network) { this, SLOT(attachIrcChannel(QString))); connect(network, SIGNAL(connectedSet(bool)), this, SIGNAL(dataChanged())); - - // FIXME: connect this and that... emit dataChanged(); } @@ -596,11 +586,12 @@ QVariant IrcUserItem::data(int column, int role) const { QString IrcUserItem::toolTip(int column) const { Q_UNUSED(column); QStringList toolTip(QString("%1").arg(nickName())); + if(_ircUser->userModes() != "") toolTip[0].append(QString("(%1)").arg(_ircUser->userModes())); if(_ircUser->isAway()) toolTip[0].append(" is away"); if(!_ircUser->awayMessage().isEmpty()) toolTip[0].append(QString(" (%1)").arg(_ircUser->awayMessage())); if(!_ircUser->realName().isEmpty()) toolTip.append(_ircUser->realName()); if(!_ircUser->ircOperator().isEmpty()) toolTip.append(_ircUser->ircOperator()); - toolTip.append(_ircUser->hostmask()); + toolTip.append(_ircUser->hostmask().remove(0, _ircUser->hostmask().indexOf("!")+1)); if(_ircUser->idleTime().isValid()) { QDateTime now = QDateTime::currentDateTime(); @@ -624,6 +615,9 @@ QString IrcUserItem::toolTip(int column) const { } toolTip.append(tr("idling since %1").arg(idleString)); } + if(_ircUser->loginTime().isValid()) { + toolTip.append(tr("login time: %1").arg(_ircUser->loginTime().toString())); + } if(!_ircUser->server().isEmpty()) toolTip.append(tr("server: %1").arg(_ircUser->server()));