diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2018-11-16 15:23:39 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-12-14 01:05:18 +0800 |
commit | 705e61b62c87842c8057e185f68d4d7a00cd17ec (patch) | |
tree | e878fb62df3b44c8c05f96bc27309badb33f0b26 /qt-models | |
parent | 201f0c8f89d6d7df96fd220ea2c0d0977c9b7f20 (diff) | |
download | subsurface-705e61b62c87842c8057e185f68d4d7a00cd17ec.tar.gz |
Hide unimplemented components from search
Those fields are not ready yet, hide them.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/filtermodels.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp index 3cae58e80..25344b712 100644 --- a/qt-models/filtermodels.cpp +++ b/qt-models/filtermodels.cpp @@ -68,6 +68,12 @@ namespace { } return true; } + + // TODO: Finish this iimplementation. + bool hasEquipment(const QStringList& equipment, const struct dive *d) + { + return true; + } } MultiFilterSortModel *MultiFilterSortModel::instance() @@ -129,6 +135,9 @@ bool MultiFilterSortModel::showDive(const struct dive *d) const if (!hasLocation(filterData.location, d)) return false; + if (!hasEquipment(filterData.equipment, d)) + return false; + return true; } |