diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-02-24 17:14:46 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-02-24 17:54:59 +0000 |
commit | fa70b1669420ae37a1da639cbd2fdeae0c3d5b76 (patch) | |
tree | d16c4626879ca4a67670786793f76972d0118fab /src/location/maps | |
parent | c3044ed7e4c6ab46cbd184f2c786699c509094e2 (diff) | |
download | qtlocation-fa70b1669420ae37a1da639cbd2fdeae0c3d5b76.tar.gz |
Use an ordered container for storing map items
Change-Id: I29988fb460881e3944e5aab9a2f4d0b542a578ef
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'src/location/maps')
-rw-r--r-- | src/location/maps/qgeomap.cpp | 4 | ||||
-rw-r--r-- | src/location/maps/qgeomap_p_p.h | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/location/maps/qgeomap.cpp b/src/location/maps/qgeomap.cpp index 93e4499a..9d3f4efa 100644 --- a/src/location/maps/qgeomap.cpp +++ b/src/location/maps/qgeomap.cpp @@ -199,7 +199,7 @@ void QGeoMap::addMapItem(QDeclarativeGeoMapItemBase *item) { Q_D(QGeoMap); if (item && !d->m_mapItems.contains(item) && d->supportedMapItemTypes() & item->itemType()) { - d->m_mapItems.insert(item); + d->m_mapItems.append(item); d->addMapItem(item); } } @@ -209,7 +209,7 @@ void QGeoMap::removeMapItem(QDeclarativeGeoMapItemBase *item) Q_D(QGeoMap); if (item && d->m_mapItems.contains(item)) { d->removeMapItem(item); - d->m_mapItems.remove(item); + d->m_mapItems.removeOne(item); } } diff --git a/src/location/maps/qgeomap_p_p.h b/src/location/maps/qgeomap_p_p.h index 4430202f..399fd75b 100644 --- a/src/location/maps/qgeomap_p_p.h +++ b/src/location/maps/qgeomap_p_p.h @@ -54,7 +54,6 @@ #include <QtCore/private/qobject_p.h> #include <QtCore/QSize> #include <QtCore/QList> -#include <QtCore/QSet> #include "qgeomap_p.h" @@ -94,7 +93,7 @@ protected: QGeoCameraData m_cameraData; QGeoMapType m_activeMapType; QList<QGeoMapParameter *> m_mapParameters; - QSet<QDeclarativeGeoMapItemBase *> m_mapItems; + QList<QDeclarativeGeoMapItemBase *> m_mapItems; }; QT_END_NAMESPACE |