diff --git a/src/folder/entitycollectionorderproxymodel.cpp b/src/folder/entitycollectionorderproxymodel.cpp index 0ce3bf3..f0c650b 100644 --- a/src/folder/entitycollectionorderproxymodel.cpp +++ b/src/folder/entitycollectionorderproxymodel.cpp @@ -141,6 +141,45 @@ bool EntityCollectionOrderProxyModel::lessThan(const QModelIndex &left, const QM } } +bool EntityCollectionOrderProxyModel::filterAcceptsRow(int source_row, const QModelIndex &parent) const +{ + + QStringList words = filterRegExp().pattern().split(' ',QString::SkipEmptyParts); + if (words.count()>1) { // helm style + bool accept = true; + + for (int i=0;(accept && imanualSortingActive == active) { diff --git a/src/folder/entitycollectionorderproxymodel.h b/src/folder/entitycollectionorderproxymodel.h index 1581c4d..e7f4d9e 100644 --- a/src/folder/entitycollectionorderproxymodel.h +++ b/src/folder/entitycollectionorderproxymodel.h @@ -36,6 +36,8 @@ public: Q_REQUIRED_RESULT bool lessThan(const QModelIndex &left, const QModelIndex &right) const override; + bool filterAcceptsRow(int source_row, const QModelIndex &parent) const override; + void setManualSortingActive(bool active); Q_REQUIRED_RESULT bool isManualSortingActive() const;