Filter: call update title directly in filter model

Instead of sending a signal when counts change, catching them
in the filter widget and update the window title there,
directly update the window title in the model. This removes a
signal/slot pair.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-04-12 15:31:11 +02:00 committed by Dirk Hohndel
parent 858d3e2eed
commit 5aacd73a00
4 changed files with 9 additions and 14 deletions

View file

@ -119,10 +119,6 @@ FilterWidget2::FilterWidget2(QWidget* parent) :
connect(qPrefUnits::instance(), &qPrefUnits::unit_systemChanged,
this, &FilterWidget2::temperatureChanged);
// Update counts if dives were added / removed
connect(MultiFilterSortModel::instance(), &MultiFilterSortModel::countsChanged,
this, &FilterWidget2::countsChanged);
// Reset all fields.
clearFilter();
}
@ -241,12 +237,6 @@ void FilterWidget2::hideEvent(QHideEvent *event)
void FilterWidget2::filterDataChanged(const FilterData &data)
{
MultiFilterSortModel::instance()->filterDataChanged(data);
countsChanged();
}
void FilterWidget2::countsChanged()
{
updateWindowTitle();
}
QString FilterWidget2::shownText()

View file

@ -33,7 +33,6 @@ private slots:
void clearFilter();
void closeFilter();
void temperatureChanged();
void countsChanged();
private:
bool ignoreSignal;