Cleanup: Pass gpsTrackers directly to GpsListModel::update()

Instead of using the GpsLocation singleton in GpsListModel::update()
to extract the gpsTrackers, pass the gpsTrackers as function argument.

The caller has direct access to the GpsLocation object anyway and this
make things less entangled.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-09-22 14:52:25 +02:00 committed by Dirk Hohndel
parent 05200f9266
commit 4d3686edec
3 changed files with 3 additions and 4 deletions

View file

@ -1556,7 +1556,7 @@ void QMLManager::applyGpsData()
void QMLManager::populateGpsData()
{
if (GpsListModel::instance())
GpsListModel::instance()->update();
GpsListModel::instance()->update(QVector<gpsTracker>::fromList(locationProvider->currentGPSInfo().values()));
}
void QMLManager::clearGpsData()