diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-02-10 20:56:26 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-02-22 15:18:31 -0800 |
commit | 03a6440b2a1001d0ab1ff7958d42217dd07b1603 (patch) | |
tree | 545b089370c0e3de8ccf4e2c5ff0da5be691dda7 /qt-models/divetripmodel.cpp | |
parent | ae5d2e6b4543d13bb432220c6cc06286085623ad (diff) | |
download | subsurface-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/divetripmodel.cpp')
-rw-r--r-- | qt-models/divetripmodel.cpp | 10 |
1 files changed, 0 insertions, 10 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(); } |