diff options
| author | Holger Freyther <[email protected]> | 2006-12-24 00:03:40 +0000 |
|---|---|---|
| committer | Holger Freyther <[email protected]> | 2006-12-24 00:03:40 +0000 |
| commit | f7e58e096623f8c23637389258d0bdb5f977bf89 (patch) | |
| tree | 207185e8844d434b43595495c0b665de335596ef /src/dolphinview.cpp | |
| parent | da88d222838ea0fa5788c3cac4b88efb53f5f8fc (diff) | |
-Use QSortFilterProxyModel for filtering instead of KDirList::setFilterName
-Map DolphinView::Sorting to a column of the KDirModel and sort this column
-Reimplement QAbstractItemModel::sort(int,SortOrder) to keep track of the
sorted column and order as dolphin uses this in the config dialogs. We will
now work correctly if a view changes sorting.
svn path=/trunk/playground/utils/dolphin/; revision=616170
Diffstat (limited to 'src/dolphinview.cpp')
| -rw-r--r-- | src/dolphinview.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 1efe33384..8fb16d1d5 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -968,8 +968,20 @@ void DolphinView::slotChangeNameFilter(const QString& nameFilter) adjustedFilter.insert(0, '*'); adjustedFilter.append('*'); +/* + * Use the ProxyModel to filter: + * This code is #ifdefed as setNameFilter behaves + * slightly different than the QSortFilterProxyModel + * as it will not remove directories. I will ask + * our beloved usability experts for input + * -- z. + */ +#if 0 m_dirLister->setNameFilter(adjustedFilter); m_dirLister->emitChanges(); +#else + m_proxyModel->setFilterRegExp( nameFilter ); +#endif } void DolphinView::applyModeToView() |
