when in a lower level, and search to an item that matches higher - the model navigates up - but the nav buttons dont change!!!!
this leads to a crash when press nav button!
   e.g. Im/
          Final Front../
            El Dorado...
        A/
           B

        If we are in 'B' and type 'Dorado' then we change to 'Im' - but nav buttons do not!
This commit is contained in:
craig
2012-01-03 19:58:33 +00:00
committed by craig
parent ae450143a2
commit 2a32ec80c3
15 changed files with 119 additions and 32 deletions

View File

@@ -28,7 +28,8 @@
#include "dirviewitemfile.h"
#include "dirviewproxymodel.h"
DirViewProxyModel::DirViewProxyModel(QObject *parent) : QSortFilterProxyModel(parent)
DirViewProxyModel::DirViewProxyModel(QObject *parent)
: ProxyModel(parent)
{
setDynamicSortFilter(true);
setFilterCaseSensitivity(Qt::CaseInsensitive);
@@ -75,6 +76,9 @@ bool DirViewProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourc
if (filterRegExp().isEmpty()) {
return true;
}
if (!isChildOfRoot(sourceParent)) {
return true;
}
const QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
DirViewItem *item = static_cast<DirViewItem *>(index.internalPointer());