Faster filter
This commit is contained in:
@@ -72,14 +72,16 @@ bool DirViewProxyModel::filterAcceptsDirViewItem(const DirViewItem * const item,
|
||||
|
||||
bool DirViewProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
|
||||
{
|
||||
if (filterRegExp().isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
|
||||
DirViewItem *item = static_cast<DirViewItem *>(index.internalPointer());
|
||||
|
||||
return filterAcceptsDirViewItem(item, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool DirViewProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const
|
||||
{
|
||||
const DirViewItem * const leftItem = static_cast<DirViewItem *>(left.internalPointer());
|
||||
|
||||
Reference in New Issue
Block a user