mobile cleanup: restyle construction of locationlist

See also e6e1473e6. The construction of the locationlist
was not the same as the 3 previous lists, and it needs
the inclusion of a new model file (divelocationmodel.cpp)
in the mobile app. In addition, as the mobile app is mainly
interested in a simple stringList (model) to populate a HintsText
field (or maybe later a combobox), this stringlist is added
to the model, to easy interfacing with QML.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
Jan Mulder 2018-01-28 15:21:28 +01:00
parent 83259008e7
commit 494ad26540
8 changed files with 24 additions and 24 deletions

View file

@ -276,6 +276,7 @@ void QMLManager::openLocalThenRemote(QString url)
buddyModel.updateModel(); emit buddyListChanged();
suitModel.updateModel(); emit suitListChanged();
divemasterModel.updateModel(); emit divemasterListChanged();
locationModel.update(); emit locationListChanged();
}
void QMLManager::mergeLocalRepo()
@ -1567,6 +1568,11 @@ QStringList QMLManager::divemasterList() const
return divemasterModel.stringList();
}
QStringList QMLManager::locationList() const
{
return locationModel.allSiteNames();
}
QStringList QMLManager::cylinderInit() const
{
QStringList cylinders;