summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-02-10 20:56:26 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-02-22 15:18:31 -0800
commit03a6440b2a1001d0ab1ff7958d42217dd07b1603 (patch)
tree545b089370c0e3de8ccf4e2c5ff0da5be691dda7 /qt-models
parentae5d2e6b4543d13bb432220c6cc06286085623ad (diff)
downloadsubsurface-03a6440b2a1001d0ab1ff7958d42217dd07b1603.tar.gz
Cleanup: remove DiveTripModelBase::SHOWN_ROLE
This role was used by the filter-proxy model as filter criterion. Since we don't use that model to filter anymore, we can remove the role. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/divetripmodel.cpp10
-rw-r--r--qt-models/divetripmodel.h1
2 files changed, 0 insertions, 11 deletions
diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp
index 33c087a5a..23292384e 100644
--- a/qt-models/divetripmodel.cpp
+++ b/qt-models/divetripmodel.cpp
@@ -841,14 +841,6 @@ void DiveTripModelTree::divesHidden(dive_trip *trip, const QVector<dive *> &dive
QVariant DiveTripModelTree::data(const QModelIndex &index, int role) const
{
- if (role == SHOWN_ROLE) {
- QModelIndex parent = index.parent();
- // An invalid parent means that we're at the top-level
- if (!parent.isValid())
- return items[index.row()].shown;
- return !items[parent.row()].dives[index.row()]->hidden_by_filter;
- }
-
// Set the font for all items alike
if (role == Qt::FontRole)
return defaultModelFont();
@@ -1409,8 +1401,6 @@ QVariant DiveTripModelList::data(const QModelIndex &index, int role) const
return defaultModelFont();
dive *d = diveOrNull(index);
- if (role == SHOWN_ROLE)
- return d && !d->hidden_by_filter;
return d ? diveData(d, index.column(), role) : QVariant();
}
diff --git a/qt-models/divetripmodel.h b/qt-models/divetripmodel.h
index ba6ba9600..4182f0bd1 100644
--- a/qt-models/divetripmodel.h
+++ b/qt-models/divetripmodel.h
@@ -49,7 +49,6 @@ public:
DIVE_ROLE,
TRIP_ROLE,
DIVE_IDX,
- SHOWN_ROLE,
SELECTED_ROLE
};
enum Layout {