mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
05200f9266
commit
4d3686edec
3 changed files with 3 additions and 4 deletions
|
@ -7,9 +7,8 @@ GpsListModel::GpsListModel(QObject *parent) : QAbstractListModel(parent)
|
|||
{
|
||||
}
|
||||
|
||||
void GpsListModel::update()
|
||||
void GpsListModel::update(QVector<gpsTracker> trackers)
|
||||
{
|
||||
QVector<gpsTracker> trackers = QVector<gpsTracker>::fromList(GpsLocation::instance()->currentGPSInfo().values());
|
||||
beginResetModel();
|
||||
m_gpsFixes = trackers;
|
||||
endResetModel();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue