| 27 | } |
| 28 | |
| 29 | bool TreeProxyFilter::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const |
| 30 | { |
| 31 | if (filterRegularExpression().isValid()) |
| 32 | { |
| 33 | QModelIndex index = sourceModel()->index(sourceRow, this->filterKeyColumn(), sourceParent); |
| 34 | if (index.isValid()) |
| 35 | { |
| 36 | for (int i = 0; i < sourceModel()->rowCount(index); ++i) |
| 37 | { |
| 38 | if (filterAcceptsRow(i, index)) |
| 39 | { |
| 40 | return true; |
| 41 | } |
| 42 | } |
| 43 | QString key = sourceModel()->data(index, filterRole()).toString(); |
| 44 | return key.contains(filterRegularExpression()); |
| 45 | } |
| 46 | } |
| 47 | return QSortFilterProxyModel::filterAcceptsRow(sourceRow, sourceParent); |
| 48 | } |
| 49 | |
| 50 | bool TreeProxyFilter::filterAcceptsRowSelf(int sourceRow, const QModelIndex &sourceParent) const |
| 51 | { |
nothing calls this directly
no outgoing calls
no test coverage detected