summaryrefslogtreecommitdiffstats
path: root/qt-models/filtermodels.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-02-10 19:34:55 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-02-22 15:18:31 -0800
commit77a1c7c1f40fd9c884c4f6323ed30c1516c93c71 (patch)
treecbd1fb3166c484811c2ce5e22a75ae3298826df4 /qt-models/filtermodels.cpp
parent7633d5feecf3cf2129f41b10ea293beb4c483d02 (diff)
downloadsubsurface-77a1c7c1f40fd9c884c4f6323ed30c1516c93c71.tar.gz
Dive list: remove filtering in MultiFilterSortModel
Since we're doing the filtering at the core, don't filter in the sort-model (which is now inappropriately named). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/filtermodels.cpp')
-rw-r--r--qt-models/filtermodels.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp
index 4bf0efd6b..8d3cb800a 100644
--- a/qt-models/filtermodels.cpp
+++ b/qt-models/filtermodels.cpp
@@ -16,9 +16,6 @@ MultiFilterSortModel *MultiFilterSortModel::instance()
MultiFilterSortModel::MultiFilterSortModel(QObject *parent) : QSortFilterProxyModel(parent)
{
resetModel(DiveTripModelBase::TREE);
- setFilterKeyColumn(-1); // filter all columns
- setFilterRole(DiveTripModelBase::SHOWN_ROLE); // Let the proxy-model known that is has to react to change events involving SHOWN_ROLE
- setFilterCaseSensitivity(Qt::CaseInsensitive);
}
void MultiFilterSortModel::resetModel(DiveTripModelBase::Layout layout)
@@ -62,9 +59,7 @@ void MultiFilterSortModel::currentDiveChangedSlot(QModelIndex index)
bool MultiFilterSortModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
{
- QAbstractItemModel *m = sourceModel();
- QModelIndex index0 = m->index(source_row, 0, source_parent);
- return m->data(index0, DiveTripModelBase::SHOWN_ROLE).value<bool>();
+ return true;
}
bool MultiFilterSortModel::lessThan(const QModelIndex &i1, const QModelIndex &i2) const