summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/Roster/QtTreeWidgetItem.cpp')
-rw-r--r--Swift/QtUI/Roster/QtTreeWidgetItem.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Swift/QtUI/Roster/QtTreeWidgetItem.cpp b/Swift/QtUI/Roster/QtTreeWidgetItem.cpp
index 1f2964e..0b90c54 100644
--- a/Swift/QtUI/Roster/QtTreeWidgetItem.cpp
+++ b/Swift/QtUI/Roster/QtTreeWidgetItem.cpp
@@ -12,8 +12,10 @@ QtTreeWidgetItem::QtTreeWidgetItem(QtTreeWidgetItem* parentItem) : QObject(), te
expanded_ = true;
}
+
void QtTreeWidgetItem::setText(const String& text) {
displayName_ = P2QSTRING(text);
+ displayNameLower_ = displayName_.toLower();
emit changed(this);
}
@@ -216,12 +218,12 @@ bool QtTreeWidgetItem::operator<(const QtTreeWidgetItem& item) const {
if (!item.isContact()) {
return false;
}
- return getStatusShow() == item.getStatusShow() ? getName().toLower() < item.getName().toLower() : getStatusShow() < item.getStatusShow();
+ return getStatusShow() == item.getStatusShow() ? getLowerName() < item.getLowerName() : getStatusShow() < item.getStatusShow();
} else {
if (item.isContact()) {
return true;
}
- return getName().toLower() < item.getName().toLower();
+ return getLowerName() < item.getLowerName();
}
}