[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:07:31 UTC 2016


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

The following commit has been merged in the master branch:
commit a1ee93ec13678e877656a1b13567333bf401f169
Author: Vishesh Handa <me at vhanda.in>
Date:   Wed Oct 10 23:44:51 2012 +0530

    Cleanup the setContactAvatar code
    
    Avoid using Nepomuk2::Resource, and use the DMS inbuilt expansion of
    nie:urls.
---
 kpeople/nepomuk-feeder/nepomuk-storage.cpp | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/kpeople/nepomuk-feeder/nepomuk-storage.cpp b/kpeople/nepomuk-feeder/nepomuk-storage.cpp
index 5e7da14..6cecf1a 100644
--- a/kpeople/nepomuk-feeder/nepomuk-storage.cpp
+++ b/kpeople/nepomuk-feeder/nepomuk-storage.cpp
@@ -842,22 +842,16 @@ void NepomukStorage::setContactAvatar(const QString &path,
     if( contact.isEmpty() )
         return;
 
-    QUrl avatarUri;
-    if( !avatar.fileName.isEmpty() ) {
-        Nepomuk2::Resource res( avatar.fileName );
-        // Save the resource
-        res.setProperty( NAO::numericRating(), 0 );
-        res.removeProperty( NAO::numericRating() );
-
-        avatarUri = res.uri();
-    }
+    QUrl avatarUrl = avatar.fileName;
+    if( avatarUrl.isEmpty() )
+        return;
 
     //FIXME: Do not remove the old avatar from the photos list?
     Nepomuk2::SimpleResource& personContact = m_graph[contact.personContact()];
-    personContact.setProperty( NCO::photo(), avatarUri );
+    personContact.setProperty( NCO::photo(), avatarUrl );
 
     Nepomuk2::SimpleResource& imAccount = m_graph[contact.imAccount()];
-    imAccount.setProperty( Telepathy::avatar(), avatarUri );
+    imAccount.setProperty( Telepathy::avatar(), avatarUrl );
 
     fireGraphTimer();
     //TODO: Find a way to index the file as well.
@@ -879,7 +873,6 @@ void NepomukStorage::onContactGraphJob(KJob* job)
 }
 
 
-
 int qHash(ContactIdentifier c)
 {
     // FIXME: This is a shit way of doing it.

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list