From 568a8d62542718ce78df317a3752d87513c13378 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 18 Mar 2020 19:55:28 +0100 Subject: 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 --- mobile-widgets/qmlmanager.cpp | 10 ++-------- mobile-widgets/qmlmanager.h | 1 - 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'mobile-widgets') diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index bc99088ee..4b3286911 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -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() diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h index 398da0454..73fa7917c 100644 --- a/mobile-widgets/qmlmanager.h +++ b/mobile-widgets/qmlmanager.h @@ -263,7 +263,6 @@ private: QString m_progressMessage; bool m_btEnabled; void updateAllGlobalLists(); - void updateSiteList(); location_t getGps(QString &gps); QString m_pluggedInDeviceName; -- cgit v1.2.3-70-g09d2