mobile: remove QMLManager::updateSiteList()

The location information model is updated automatically by the
divelist-model and the undo commands. Therefore remove the
QMLManager::updateSiteList() function. We do have to keep
the locationListChanged() signal though, because the list
of dive sites is not exported via model/view but rather via
a Q_PROPERTY. We really should change that.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-03-18 19:55:28 +01:00 committed by Dirk Hohndel
parent 9310d72943
commit 568a8d6254
2 changed files with 2 additions and 9 deletions

View file

@ -412,19 +412,13 @@ void QMLManager::selectSwipeRow(int row)
select_single_dive(d);
}
void QMLManager::updateSiteList()
{
LocationInformationModel::instance()->update();
emit locationListChanged();
}
void QMLManager::updateAllGlobalLists()
{
buddyModel.updateModel(); emit buddyListChanged();
suitModel.updateModel(); emit suitListChanged();
divemasterModel.updateModel(); emit divemasterListChanged();
// TODO: Probably not needed anymore, as the dive site list is generated on the fly!
updateSiteList();
// TODO: It would be nice if we could export the list of locations via model/view instead of a Q_PROPERTY
emit locationListChanged();
}
static QString nocloud_localstorage()

View file

@ -263,7 +263,6 @@ private:
QString m_progressMessage;
bool m_btEnabled;
void updateAllGlobalLists();
void updateSiteList();
location_t getGps(QString &gps);
QString m_pluggedInDeviceName;