From 016e582df39899c1356e4023ebc5a4b28a2e57ee Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Tue, 12 Feb 2008 01:48:41 +0000 Subject: [PATCH] Fix case-insensitivity for channel names, and add some more translatable strings. --- src/client/networkmodel.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/client/networkmodel.cpp b/src/client/networkmodel.cpp index 755a2c67..74598fa1 100644 --- a/src/client/networkmodel.cpp +++ b/src/client/networkmodel.cpp @@ -387,7 +387,7 @@ void NetworkItem::attachIrcChannel(const QString &channelName) { BufferItem *bufferItem; for(int i = 0; i < childCount(); i++) { bufferItem = qobject_cast(child(i)); - if(bufferItem->bufferName() == ircChannel->name()) { + if(bufferItem->bufferName().toLower() == ircChannel->name().toLower()) { bufferItem->attachIrcChannel(ircChannel); break; } @@ -410,12 +410,11 @@ void NetworkItem::setCurrentServer(const QString &serverName) { // we hardcode this even though we have PREFIX in network... but that wouldn't help with mapping modes to // category strings anyway. const QList UserCategoryItem::categories = QList() - << UserCategoryItem::Category('q', "Owners") - << UserCategoryItem::Category('a', "Admins") - << UserCategoryItem::Category('a', "Admins") - << UserCategoryItem::Category('o', "Operators") - << UserCategoryItem::Category('h', "Half-Ops") - << UserCategoryItem::Category('v', "Voiced"); + << UserCategoryItem::Category('q', tr("Owners")) + << UserCategoryItem::Category('a', tr("Admins")) + << UserCategoryItem::Category('o', tr("Operators")) + << UserCategoryItem::Category('h', tr("Half-Ops")) + << UserCategoryItem::Category('v', tr("Voiced")); UserCategoryItem::UserCategoryItem(int category, AbstractTreeItem *parent) : PropertyMapItem(QStringList() << "categoryId", parent), @@ -427,7 +426,7 @@ QString UserCategoryItem::categoryId() { if(_category < categories.count()) return categories[_category].displayString; else - return QString("Users"); + return tr("Users"); } quint64 UserCategoryItem::id() const { @@ -551,10 +550,10 @@ QString IrcUserItem::toolTip(int column) const { } idleTime = idleTime % timeUnit[i].first; } - toolTip.append(QString("idling since %1").arg(idleString)); + toolTip.append(tr("idling since %1").arg(idleString)); } - if(!_ircUser->server().isEmpty()) toolTip.append(QString("server: %1").arg(_ircUser->server())); + if(!_ircUser->server().isEmpty()) toolTip.append(tr("server: %1").arg(_ircUser->server())); return QString("

%1

").arg(toolTip.join("
")); } -- 2.20.1