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, 5 insertions, 1 deletions
diff --git a/Swift/QtUI/Roster/QtTreeWidgetItem.cpp b/Swift/QtUI/Roster/QtTreeWidgetItem.cpp
index 9ba149e..2796c12 100644
--- a/Swift/QtUI/Roster/QtTreeWidgetItem.cpp
+++ b/Swift/QtUI/Roster/QtTreeWidgetItem.cpp
@@ -175,7 +175,7 @@ QVariant QtTreeWidgetItem::data(int role) {
case Qt::DisplayRole: return displayName_;
case Qt::TextColorRole: return textColor_;
case Qt::BackgroundColorRole: return backgroundColor_;
- case Qt::ToolTipRole: return isContact() ? displayName_ + ": " + statusText_ : QVariant();
+ case Qt::ToolTipRole: return isContact() ? toolTipString() : QVariant();
case StatusTextRole: return statusText_;
case AvatarRole: return avatar_;
case PresenceIconRole: return getPresenceIcon();
@@ -183,6 +183,10 @@ QVariant QtTreeWidgetItem::data(int role) {
}
}
+QString QtTreeWidgetItem::toolTipString() {
+ return displayName_ + "\n " + statusText_;
+}
+
QIcon QtTreeWidgetItem::getPresenceIcon() {
QString iconString;
switch (statusShowType_) {