mobile/filter: derive numShown from a new Q_PROPERTY

The number of dives was updated when the model of the list was
changed. Since we removed the multi-threading, the model is
not disconnected/connected anymore and therefore we don't get
the appropriate signal. Instead of introducing a different
signal, make the shown-value a Q_PROPERTY. Thus, we can easily
send a changed signal if we have to.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-02-23 20:18:13 +01:00 committed by Dirk Hohndel
parent 6f2a6fef14
commit d6114fc37e
3 changed files with 6 additions and 7 deletions

View file

@ -195,6 +195,7 @@ DiveListSortModel *DiveListSortModel::instance()
void DiveListSortModel::updateFilterState()
{
DiveFilter::instance()->updateAll();
emit shownChanged();
}
void DiveListSortModel::setSourceModel(QAbstractItemModel *sourceModel)