desktop: automatically reload completion-models

Instead of programatically reload the completion models, listen
to the relevant signals in the models. To that goal, derive all
the models from a base class.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-11-14 17:42:59 +01:00 committed by Dirk Hohndel
parent 52d5125926
commit 38a784f5af
5 changed files with 83 additions and 36 deletions

View file

@ -452,9 +452,9 @@ void QMLManager::selectSwipeRow(int row)
void QMLManager::updateAllGlobalLists()
{
buddyModel.updateModel(); emit buddyListChanged();
suitModel.updateModel(); emit suitListChanged();
divemasterModel.updateModel(); emit divemasterListChanged();
emit buddyListChanged();
emit suitListChanged();
emit divemasterListChanged();
// TODO: It would be nice if we could export the list of locations via model/view instead of a Q_PROPERTY
emit locationListChanged();
}