summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-07-21 02:57:11 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-07-21 05:30:24 (GMT)
commitb84479c51ce875ca1be615a50d4afbad4defc491 (patch)
treeb63f857e20cd6d93dd01dcf5c82e33c1ccf10225
parente220d1365195e651e229f539a01ff2cc6992f261 (diff)
QList<QRegion> -> QVector<QRegion>
-rw-r--r--src/plugins/render/annotate/AreaAnnotation.cpp1
-rw-r--r--src/plugins/render/annotate/AreaAnnotation.h2
-rw-r--r--src/plugins/render/annotate/GroundOverlayFrame.cpp1
-rw-r--r--src/plugins/render/annotate/GroundOverlayFrame.h2
4 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/render/annotate/AreaAnnotation.cpp b/src/plugins/render/annotate/AreaAnnotation.cpp
index 0e344a8..e2b977f 100644
--- a/src/plugins/render/annotate/AreaAnnotation.cpp
+++ b/src/plugins/render/annotate/AreaAnnotation.cpp
@@ -696,6 +696,7 @@ void AreaAnnotation::updateRegions( GeoPainter *painter )
// Update the boundaries list.
m_boundariesList.clear();
+ m_boundariesList.reserve(1 + innerRings.size());
m_boundariesList.append( painter->regionFromPolygon( outerRing, Qt::OddEvenFill ) );
foreach ( const GeoDataLinearRing &ring, innerRings ) {
diff --git a/src/plugins/render/annotate/AreaAnnotation.h b/src/plugins/render/annotate/AreaAnnotation.h
index 36098a5..b1809bf 100644
--- a/src/plugins/render/annotate/AreaAnnotation.h
+++ b/src/plugins/render/annotate/AreaAnnotation.h
@@ -238,7 +238,7 @@ private:
QList<PolylineNode> m_outerVirtualNodes;
QList< QList<PolylineNode> > m_innerNodesList;
QList< QList<PolylineNode> > m_innerVirtualNodes;
- QList<QRegion> m_boundariesList;
+ QVector<QRegion> m_boundariesList;
// Used in the Editing state
enum EditingInteractingObject {
diff --git a/src/plugins/render/annotate/GroundOverlayFrame.cpp b/src/plugins/render/annotate/GroundOverlayFrame.cpp
index cd79492..feec522 100644
--- a/src/plugins/render/annotate/GroundOverlayFrame.cpp
+++ b/src/plugins/render/annotate/GroundOverlayFrame.cpp
@@ -126,6 +126,7 @@ void GroundOverlayFrame::paint(GeoPainter *painter, const ViewportParams *viewpo
coordinateList.append( ring.at( NorthEast ).interpolate( ring.at( SouthEast ), 0.5 ) );
coordinateList.append( ring.at( NorthWest ).interpolate( ring.at( SouthWest ), 0.5 ) );
+ m_regionList.reserve(9);
m_regionList.append( painter->regionFromEllipse( coordinateList.at( NorthWest ), 16, 16 ) );
m_regionList.append( painter->regionFromEllipse( coordinateList.at( SouthWest ), 16, 16 ) );
m_regionList.append( painter->regionFromEllipse( coordinateList.at( SouthEast ), 16, 16 ) );
diff --git a/src/plugins/render/annotate/GroundOverlayFrame.h b/src/plugins/render/annotate/GroundOverlayFrame.h
index 5de8551..1f2fa90 100644
--- a/src/plugins/render/annotate/GroundOverlayFrame.h
+++ b/src/plugins/render/annotate/GroundOverlayFrame.h
@@ -65,7 +65,7 @@ private:
GeoDataGroundOverlay *m_overlay;
TextureLayer *m_textureLayer;
- QList<QRegion> m_regionList;
+ QVector<QRegion> m_regionList;
GeoDataCoordinates m_movedHandleGeoCoordinates;
QPoint m_movedHandleScreenCoordinates;
int m_movedHandle;