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


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

The following commit has been merged in the master branch:
commit 209a9b4ed3e5812d407eb583ab32be2e0711cabd
Author: Florian Reinhard <florian.reinhard at googlemail.com>
Date:   Fri Dec 28 22:40:43 2012 +0000

    Port AccountsFilterModel away from GroupModelItem
    
    (and disable the filtering for now)
---
 KTp/Models/accounts-filter-model.cpp | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/KTp/Models/accounts-filter-model.cpp b/KTp/Models/accounts-filter-model.cpp
index 882b134..cd68025 100644
--- a/KTp/Models/accounts-filter-model.cpp
+++ b/KTp/Models/accounts-filter-model.cpp
@@ -359,29 +359,28 @@ bool AccountsFilterModel::Private::filterAcceptsContact(const QModelIndex &index
 
 bool AccountsFilterModel::Private::filterAcceptsGroup(const QModelIndex &index) const
 {
-    QVariant item = index.data(ContactsModel::ItemRole);
-    GroupsModelItem *gmItem = item.value<GroupsModelItem*>();
+    QString groupName = index.data(ContactsModel::IdRole).toString();
 
     if (presenceTypeFilterFlags != DoNotFilterByPresence) {
         // If there is no cached value, create one
-        if (!m_onlineContactsCounts.contains(gmItem->groupName())) {
+        if (!m_onlineContactsCounts.contains(groupName)) {
             q->countContacts(index);
         }
 
         // Don't accept groups with no online contacts
-        if (m_onlineContactsCounts.value(gmItem->groupName()) == 0) {
-            return false;
+        if (m_onlineContactsCounts.value(groupName) == 0) {
+//             return false;
         }
     }
     else {
         // If there is no cached value, create one
-        if (!m_totalContactsCounts.contains(gmItem->groupName())) {
+        if (!m_totalContactsCounts.contains(groupName)) {
             q->countContacts(index);
         }
 
         // Don't accept groups with no total contacts
-        if (m_totalContactsCounts.value(gmItem->groupName()) == 0) {
-            return false;
+        if (m_totalContactsCounts.value(groupName) == 0) {
+//             return false;
         }
     }
     return true;

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list