Commit e4192e8d authored by Christian Mollekopf's avatar Christian Mollekopf Committed by Sandro Knauß
Browse files

CollectionFilter: QModelIndex::child doesn't work on an invalid index

(cherry picked from commit f5ab940aea77c97a438a2b51304802aa8efa0dc7)
parent 9491d644
......@@ -347,7 +347,8 @@ class CollectionFilter : public QSortFilterProxyModel
protected:
virtual bool filterAcceptsRow(int row, const QModelIndex &sourceParent) const {
const QModelIndex sourceIndex = sourceParent.child(row, 0);
const QModelIndex sourceIndex = sourceModel()->index(row, 0, sourceParent);
Q_ASSERT(sourceIndex.isValid());
const Akonadi::Collection &col = sourceIndex.data(Akonadi::EntityTreeModel::CollectionRole).value<Akonadi::Collection>();
CollectionIdentificationAttribute *attr = col.attribute<CollectionIdentificationAttribute>();
//We filter the user folders because we insert person nodes for user folders.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment