From 33142ed7f861648b77a24d9b905bd04e23213a13 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 9 Jan 2016 14:07:58 -0800 Subject: Reimplement the internal repesentation of GPS fixes Instead of using the Settings as our data structure and constantly accessing them, we now have a QMap for the GPS fixes and only access the Settings to keep them in sync with the QMap. This should significantly speed things up. Signed-off-by: Dirk Hohndel --- qt-models/gpslistmodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qt-models') diff --git a/qt-models/gpslistmodel.cpp b/qt-models/gpslistmodel.cpp index 23349b00e..84f5e7f3a 100644 --- a/qt-models/gpslistmodel.cpp +++ b/qt-models/gpslistmodel.cpp @@ -1,5 +1,6 @@ #include "gpslistmodel.h" #include "helpers.h" +#include GpsListModel *GpsListModel::m_instance = NULL; @@ -17,7 +18,7 @@ void GpsListModel::addGpsFix(gpsTracker g) void GpsListModel::update() { - QVector trackers = GpsLocation::instance()->currentGPSInfo(); + QVector trackers = QVector::fromList(GpsLocation::instance()->currentGPSInfo().values()); beginResetModel(); m_gpsFixes = trackers; endResetModel(); -- cgit v1.2.3-70-g09d2