From de90480b462891d1b03f8c40c9a42a7bf29d6d35 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Mon, 17 Jul 2017 23:04:00 +0300 Subject: maplocationmodel: use QVector for the MapLocation storage QVector is faster, use it for "m_mapLocations" instead of QList. Signed-off-by: Lubomir I. Ivanov --- qt-models/maplocationmodel.cpp | 2 +- qt-models/maplocationmodel.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'qt-models') diff --git a/qt-models/maplocationmodel.cpp b/qt-models/maplocationmodel.cpp index 62cd49aba..911905f1b 100644 --- a/qt-models/maplocationmodel.cpp +++ b/qt-models/maplocationmodel.cpp @@ -68,7 +68,7 @@ void MapLocationModel::add(MapLocation *location) endInsertRows(); } -void MapLocationModel::addList(QList list) +void MapLocationModel::addList(QVector list) { if (!list.size()) return; diff --git a/qt-models/maplocationmodel.h b/qt-models/maplocationmodel.h index c73fa246e..547641fe7 100644 --- a/qt-models/maplocationmodel.h +++ b/qt-models/maplocationmodel.h @@ -3,7 +3,7 @@ #define MAPLOCATIONMODEL_H #include -#include +#include #include #include #include @@ -43,14 +43,14 @@ public: int rowCount(const QModelIndex &parent) const override; int count(); void add(MapLocation *); - void addList(QList); + void addList(QVector); void clear(); protected: QHash roleNames() const; private: - QList m_mapLocations; + QVector m_mapLocations; QHash m_roles; signals: -- cgit v1.2.3-70-g09d2