From edfa5624164f0369180d90d13c6a88bbc31c6248 Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Tue, 25 May 2010 14:39:11 +0100
Subject: Don't show a blank line for empty status in tooltips.

Resolves: #384

diff --git a/Swift/QtUI/Roster/RosterModel.cpp b/Swift/QtUI/Roster/RosterModel.cpp
index 00a032d..12cedda 100644
--- a/Swift/QtUI/Roster/RosterModel.cpp
+++ b/Swift/QtUI/Roster/RosterModel.cpp
@@ -120,7 +120,7 @@ QColor RosterModel::getBackgroundColor(RosterItem* item) const {
 }
 
 QString RosterModel::getToolTip(RosterItem* item) const {
-	return dynamic_cast<ContactRosterItem*>(item) ? P2QSTRING(item->getDisplayName()) + "\n" + getStatusText(item) : P2QSTRING(item->getDisplayName());
+	return dynamic_cast<ContactRosterItem*>(item) && !getStatusText(item).isEmpty() ? P2QSTRING(item->getDisplayName()) + "\n" + getStatusText(item) : P2QSTRING(item->getDisplayName());
 }
 
 QIcon RosterModel::getAvatar(RosterItem* item) const {
-- 
cgit v0.10.2-6-g49f6