[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:05:55 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=73725a8

The following commit has been merged in the master branch:
commit 73725a8df9f7625520381498991c255faf2aead8
Author: Keith Rusler <xzekecomax at gmail.com>
Date:   Thu Apr 14 04:49:44 2011 -0500

    Added default avatar to tooltips only if the contact has no default avatar else it will use the contacts avatar.
    
    BUG: 270492
---
 contact-delegate.cpp | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/contact-delegate.cpp b/contact-delegate.cpp
index 89514d2..2e32dd3 100644
--- a/contact-delegate.cpp
+++ b/contact-delegate.cpp
@@ -252,27 +252,27 @@ bool ContactDelegate::helpEvent(QHelpEvent *event, QAbstractItemView *view, cons
 
     switch (index.data(AccountsModel::PresenceTypeRole).toUInt()) {
     case Tp::ConnectionPresenceTypeAvailable:
-        presenseIconPath = KIconLoader().iconPath("user-online", 1);
+        presenseIconPath = KIconLoader::global()->iconPath("user-online", 1);
         presenseText = i18n("Online");
         break;
     case Tp::ConnectionPresenceTypeAway:
-        presenseIconPath = KIconLoader().iconPath("user-away", 1);
+        presenseIconPath = KIconLoader::global()->iconPath("user-away", 1);
         presenseText = i18n("Away");
         break;
     case Tp::ConnectionPresenceTypeExtendedAway:
-        presenseIconPath = KIconLoader().iconPath("user-away-extended", 1);
+        presenseIconPath = KIconLoader::global()->iconPath("user-away-extended", 1);
         presenseText = i18n("Away");
         break;
     case Tp::ConnectionPresenceTypeBusy:
-        presenseIconPath = KIconLoader().iconPath("user-busy", 1);
+        presenseIconPath = KIconLoader::global()->iconPath("user-busy", 1);
         presenseText = i18n("Busy");
         break;
     case Tp::ConnectionPresenceTypeOffline:
-        presenseIconPath = KIconLoader().iconPath("user-offline", 1);
+        presenseIconPath = KIconLoader::global()->iconPath("user-offline", 1);
         presenseText = i18n("Offline");
         break;
     default:
-        presenseIconPath = KIconLoader().iconPath("task-attention", 1);
+        presenseIconPath = KIconLoader::global()->iconPath("task-attention", 1);
         // What presense Text should be here??
         break;
     }
@@ -291,13 +291,16 @@ bool ContactDelegate::helpEvent(QHelpEvent *event, QAbstractItemView *view, cons
      * * Contact is blocked will only show if the contact is blocked, else no display.
      */
 
+    kDebug() << contactAvatar;
+
     QString table;
-    table += QString("<table><th colspan='2' align='center'><b>%1</b> <img src='%2' height='16' width='16' /> %3</th>").arg(i18n("Account:"), cmIconPath, displayName);
-    if (contactAvatar.isEmpty()) {
-        table += "<tr><td></td>";
+    table += QString("<table><th colspan='2' align='center'><img src='%2' height='16' width='16' /> %3</th>").arg(cmIconPath, displayName);
+    if (contactAvatar.isEmpty() || QPixmap(contactAvatar).isNull()) {
+        table += QString("<tr><td><img src='%1' width='96' /></td>").arg(KIconLoader::global()->iconPath("im-user", -1));
     } else {
-        table += QString("<tr><td><img src='%1' /></td>").arg(contactAvatar);
+        table += QString("<tr><td><img src='%1' width='96' /></td>").arg(contactAvatar);
     }
+    
     table += "<td><table><tr>";
     table += QString("<td align='right'><b>%1</b></td>").arg(i18n("Alias:"));
     table += QString("<td>%1</td></tr>").arg(alias);

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list