From 89eed5d36e611f882dbf1e2686ad389f65688fa1 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 8 Jan 2016 13:11:49 -0200 Subject: Untangle Library Linkage with the adittion of gpslistmodel/location, the libraries qt-models had a direct dependency on subsurface-core, and subsurface-core had a direct dependency on qt-models, this is bad. Moving a bit of code around I'v managed to clean this out, and also to clear a bit of uneeded code (GpsTracker and gpsTracker where basically the same thing.) Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-mobile/qmlmanager.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'qt-mobile') diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp index e9682d623..1d68dc3a7 100644 --- a/qt-mobile/qmlmanager.cpp +++ b/qt-mobile/qmlmanager.cpp @@ -8,6 +8,7 @@ #include #include "qt-models/divelistmodel.h" +#include #include "divelist.h" #include "pref.h" #include "qthelper.h" @@ -511,18 +512,20 @@ void QMLManager::sendGpsData() void QMLManager::downloadGpsData() { locationProvider->downloadFromServer(); - locationProvider->updateModel(); + populateGpsData(); + } void QMLManager::populateGpsData() { - locationProvider->updateModel(); + if (GpsListModel::instance()) + GpsListModel::instance()->update(); } void QMLManager::clearGpsData() { locationProvider->clearGpsData(); - locationProvider->updateModel(); + populateGpsData(); } QString QMLManager::logText() const -- cgit v1.2.3-70-g09d2