summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/Roster/RosterModel.cpp')
-rw-r--r--Swift/QtUI/Roster/RosterModel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Swift/QtUI/Roster/RosterModel.cpp b/Swift/QtUI/Roster/RosterModel.cpp
index 2399a21..1fc20dd 100644
--- a/Swift/QtUI/Roster/RosterModel.cpp
+++ b/Swift/QtUI/Roster/RosterModel.cpp
@@ -135,12 +135,12 @@ QString RosterModel::getToolTip(RosterItem* item) const {
return tip;
}
-QIcon RosterModel::getAvatar(RosterItem* item) const {
+QString RosterModel::getAvatar(RosterItem* item) const {
ContactRosterItem* contact = dynamic_cast<ContactRosterItem*>(item);
- if (!contact) return QIcon();
- std::string path = contact->getAvatarPath();
-
- return path.empty() ? QIcon() : QIcon(P2QSTRING(path));
+ if (!contact) {
+ return "";
+ }
+ return QString(contact->getAvatarPath().c_str());
}
QString RosterModel::getStatusText(RosterItem* item) const {