[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:00 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=ee23004
The following commit has been merged in the master branch:
commit ee230048214fd33a4064fd991b5e3f3956182577
Author: David Edmundson <david at davidedmundson.co.uk>
Date: Mon Jul 22 17:29:17 2013 +0000
Restore hiding empty groups
REVIEW: 111601
BUG: 315620
---
KTp/Models/contacts-filter-model.cpp | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/KTp/Models/contacts-filter-model.cpp b/KTp/Models/contacts-filter-model.cpp
index ff12e6c..2bee560 100644
--- a/KTp/Models/contacts-filter-model.cpp
+++ b/KTp/Models/contacts-filter-model.cpp
@@ -346,7 +346,7 @@ bool ContactsFilterModel::Private::filterAcceptsGroup(const QModelIndex &index)
// Don't accept groups with no online contacts
if (m_onlineContactsCounts.value(groupName) == 0) {
-// return false;
+ return false;
}
}
else {
@@ -357,7 +357,7 @@ bool ContactsFilterModel::Private::filterAcceptsGroup(const QModelIndex &index)
// Don't accept groups with no total contacts
if (m_totalContactsCounts.value(groupName) == 0) {
-// return false;
+ return false;
}
}
return true;
@@ -407,8 +407,10 @@ void ContactsFilterModel::Private::sourceModelParentIndexChanged(const QModelInd
{
if (sourceIndex.isValid()) {
countContacts(sourceIndex);
- const QModelIndex mappedIndex = q->mapFromSource(sourceIndex);
- Q_EMIT q->dataChanged(mappedIndex, mappedIndex);
+
+ //emit that the source parent changed, this way it will go through "filterAcceptsRow" again
+ //and filter empty groups
+ QMetaObject::invokeMethod(q->sourceModel(), "dataChanged", Q_ARG(QModelIndex, sourceIndex), Q_ARG(QModelIndex, sourceIndex));
}
}
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list