Commit 1a58ba67 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

Port away from deprecated Qt API

parent 156eaa59
......@@ -345,7 +345,7 @@ static Collection::List filterDescendants(const Collection::List &list)
for (const Collection &collection : list) {
int i = 0;
for (const QList<Collection::Id> &ancestors : qAsConst(ids)) {
if (qBinaryFind(ancestors, collection.id()) != ancestors.end()) {
if (std::binary_search(ancestors.cbegin(), ancestors.cend(), collection.id())) {
excludeList.insert(list.at(i).id());
}
++i;
......
......@@ -91,7 +91,7 @@ bool CollectionFilterProxyModel::Private::collectionAccepted(const QModelIndex &
}
// If this collection has a child which contains valid mimetypes, it is accepted
QModelIndex childIndex = index.child(0, 0);
QModelIndex childIndex = mParent->sourceModel()->index(0, 0, index);
while (childIndex.isValid()) {
if (collectionAccepted(childIndex, false /* don't check visibility of the parent, as we are checking the child now */)) {
......
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