Commit 1f1a2931 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port toSet method

parent 035ba5cf
......@@ -52,7 +52,12 @@ bool CollectionFilterModel::filterAcceptsRow(int row, const QModelIndex &parent)
}
if (!mContentMimeTypes.isEmpty()) {
QSet<QString> contentMimeTypes = collection.contentMimeTypes().toSet();
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
const QSet<QString> contentMimeTypes = collection.contentMimeTypes().toSet();
#else
const auto collectionMimeTypesSet = collection.contentMimeTypes();
const QSet<QString> contentMimeTypes = QSet<QString>(collectionMimeTypesSet.begin(), collectionMimeTypesSet.end());
#endif
accepted = accepted && contentMimeTypes.intersects(mContentMimeTypes);
}
......
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