[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:06:57 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=db2552a

The following commit has been merged in the master branch:
commit db2552a2d0bd3de9e27547735f2f73d03e598593
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date:   Tue Jul 2 15:02:58 2013 +0200

    Use item's URI as the id for the pixmap cache
    
    Reviewed-by: David Edmundson
---
 KTp/Models/kpeopletranslationproxy.cpp | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/KTp/Models/kpeopletranslationproxy.cpp b/KTp/Models/kpeopletranslationproxy.cpp
index 933eafd..e89f0e8 100644
--- a/KTp/Models/kpeopletranslationproxy.cpp
+++ b/KTp/Models/kpeopletranslationproxy.cpp
@@ -184,18 +184,9 @@ QPixmap KPeopleTranslationProxy::contactPixmap(const QModelIndex &index) const
     QPixmap avatar;
 
     int presenceType = index.data(KTp::ContactPresenceTypeRole).toInt();
-    //we need contact's ID to generate proper cache key for this contact
-    QString id;
-    if (index.data(KTp::RowTypeRole).toInt() == KTp::PersonRowType) {
-        //persons return ids as list of child contacts ids
-        const QVariantList ids = index.data(KTp::IdRole).toList();
-        if (!ids.isEmpty()) {
-            id = ids.first().toString();
-        }
-    } else {
-        //contact returns id as string
-        id = index.data(KTp::IdRole).toString();
-    }
+    //we need some ID to generate proper cache key for this contact
+    //so we'll use the contact's uri
+    const QString id = index.data(KTp::NepomukUriRole).toString();
 
     //key for the pixmap cache, so we can look up the avatar
     const QString keyCache = id + (presenceType == Tp::ConnectionPresenceTypeOffline ? QLatin1String("-offline") : QLatin1String("-online"));

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list