maplocationmodel: use QVector for the MapLocation storage

QVector is faster, use it for "m_mapLocations" instead of QList.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2017-07-17 23:04:00 +03:00 committed by Dirk Hohndel
parent ffcfde3b62
commit de90480b46
3 changed files with 5 additions and 5 deletions

View file

@ -3,7 +3,7 @@
#define MAPLOCATIONMODEL_H
#include <QObject>
#include <QList>
#include <QVector>
#include <QHash>
#include <QByteArray>
#include <QAbstractListModel>
@ -43,14 +43,14 @@ public:
int rowCount(const QModelIndex &parent) const override;
int count();
void add(MapLocation *);
void addList(QList<MapLocation *>);
void addList(QVector<MapLocation *>);
void clear();
protected:
QHash<int, QByteArray> roleNames() const;
private:
QList<MapLocation *> m_mapLocations;
QVector<MapLocation *> m_mapLocations;
QHash<int, QByteArray> m_roles;
signals: