cleanup: move shown-text calculation from filter widget to core

The filter widget was caching whether the filter was active and
used that flag to calculate the "# dives shown" string. Move this
directly to the DiveFilter class to remove interdependencies and
to unify with mobile.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-06-22 14:05:46 +02:00 committed by Dirk Hohndel
parent 68fffc2672
commit 38b686687f
5 changed files with 12 additions and 14 deletions

View file

@ -20,7 +20,6 @@ class FilterWidget2 : public QWidget {
public:
explicit FilterWidget2(QWidget *parent = 0);
~FilterWidget2();
QString shownText();
protected:
void hideEvent(QHideEvent *event) override;
@ -43,7 +42,6 @@ private:
bool ignoreSignal;
Ui::FilterWidget2 ui;
FilterConstraintModel constraintModel;
bool validFilter;
void addConstraint(filter_constraint_type type);
std::vector<std::unique_ptr<FilterConstraintWidget>> constraintWidgets;
FilterData createFilterData() const;