Filter: use hidden_by_filter also on mobile

Desktop used the hidden_in_filter flag in struct dive, mobile
used its own vector plus a new showndives member in struct dive_trip.

Unifiy these to use the same core-facility, viz. hidden_by_filter.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-11-22 23:28:06 +01:00 committed by Dirk Hohndel
parent 70897dd1b7
commit 1ebf5a99ed
3 changed files with 16 additions and 38 deletions

View file

@ -24,11 +24,9 @@ public slots:
void setFilter(QString f);
void resetFilter();
int shown();
void updateDivesShownInTrips();
protected:
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
private:
std::vector<unsigned char> filteredRows; // using unsigned char because using 'bool' turns this into a bitfield
QString filterString;
void updateFilterState();
};