diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2016-01-08 13:11:49 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-01-08 08:04:04 -0800 |
commit | 89eed5d36e611f882dbf1e2686ad389f65688fa1 (patch) | |
tree | b7e185df6424d46c9d992ea388a03d4a6b19fd7e /qt-mobile/qmlmanager.cpp | |
parent | 7b155774c5105f84303e869317fc946b11b3e78b (diff) | |
download | subsurface-89eed5d36e611f882dbf1e2686ad389f65688fa1.tar.gz |
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 <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qmlmanager.cpp')
-rw-r--r-- | qt-mobile/qmlmanager.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
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 <QTextDocument> #include "qt-models/divelistmodel.h" +#include <gpslistmodel.h> #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 |