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


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

The following commit has been merged in the master branch:
commit 2cf3bafb7271c2f77bd53183c03fc4f8a9da4c3b
Author: George Goldberg <george.goldberg at collabora.co.uk>
Date:   Thu Jul 21 12:03:21 2011 +0100

    Speed up setting contact properties a bit by only writing them when they have actually changed.
---
 kpeople/nepomuk-feeder/nepomuk-storage.cpp | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/kpeople/nepomuk-feeder/nepomuk-storage.cpp b/kpeople/nepomuk-feeder/nepomuk-storage.cpp
index 0138293..51382fc 100644
--- a/kpeople/nepomuk-feeder/nepomuk-storage.cpp
+++ b/kpeople/nepomuk-feeder/nepomuk-storage.cpp
@@ -474,8 +474,10 @@ void NepomukStorage::setContactAlias(const QString &path, const QString &id, con
 
     Nepomuk::IMAccount imAccount = resources.imAccount();
 
-    // Set the Contact Alias.
-    imAccount.setImNicknames(QStringList() << alias);
+    if (!imAccount.imNicknames().contains(alias)) {
+        // Set the Contact Alias.
+        imAccount.setImNicknames(QStringList() << alias);
+    }
 }
 
 void NepomukStorage::setContactPresence(const QString &path,
@@ -496,16 +498,24 @@ void NepomukStorage::setContactPresence(const QString &path,
     Nepomuk::IMAccount imAccount = resources.imAccount();
 
     // Set the contact presence.
-    imAccount.setImStatus(presence.status);
-    imAccount.setStatusType(presence.type);
+    if (imAccount.imStatus() != presence.status) {
+        imAccount.setImStatus(presence.status);
+    }
+
+    if (imAccount.statusType() != presence.type) {
+        imAccount.setStatusType(presence.type);
+    }
 
-    imAccount.setImStatusMessage(presence.statusMessage);
+    if (imAccount.imStatusMessage() != presence.statusMessage) {
+        imAccount.setImStatusMessage(presence.statusMessage);
+    }
 }
 
 void NepomukStorage::setContactGroups(const QString &path,
                                       const QString &id,
                                       const QStringList &groups)
 {
+    kDebug() << "Set Groups Starting";
     ContactIdentifier identifier(path, id);
 
     // Check the Contact exists.
@@ -564,6 +574,7 @@ void NepomukStorage::setContactGroups(const QString &path,
 
     // Update the groups property with the new list
     personContact.setBelongsToGroups(newGroups);
+    kDebug() << "Set Groups Ending";
 }
 
 void NepomukStorage::setContactBlockStatus(const QString &path, const QString &id, bool blocked)
@@ -582,7 +593,9 @@ void NepomukStorage::setContactBlockStatus(const QString &path, const QString &i
     Nepomuk::IMAccount imAccount = resources.imAccount();
 
     // Set the blocked status.
-    imAccount.setIsBlocked(blocked);
+    if (imAccount.isBlocked() != blocked) {
+        imAccount.setIsBlocked(blocked);
+    }
 }
 
 void NepomukStorage::setContactPublishState(const QString &path,

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list