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


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

The following commit has been merged in the master branch:
commit 79bc0b0c644e9ed940ccf82124c46afeefcb7e60
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Thu Sep 12 15:53:17 2013 +0000

    Only update group counts for group headings
    
    This fixes potential infinite loop in contact list
---
 KTp/Models/contacts-filter-model.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/KTp/Models/contacts-filter-model.cpp b/KTp/Models/contacts-filter-model.cpp
index dc02c9b..df12112 100644
--- a/KTp/Models/contacts-filter-model.cpp
+++ b/KTp/Models/contacts-filter-model.cpp
@@ -405,7 +405,10 @@ void ContactsFilterModel::Private::countContacts(const QModelIndex &sourceParent
 
 void ContactsFilterModel::Private::sourceModelParentIndexChanged(const QModelIndex &sourceIndex)
 {
-    if (sourceIndex.isValid()) {
+    //if parent is a group heading
+    if (sourceIndex.isValid() &&
+        (sourceIndex.data(KTp::RowTypeRole).toInt() == KTp::GroupRowType ||
+        sourceIndex.data(KTp::RowTypeRole).toInt() == KTp::AccountRowType)) {
         countContacts(sourceIndex);
 
         //emit that the source parent changed, this way it will go through "filterAcceptsRow" again

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list