summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-10-05 22:23:07 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-10-05 22:23:07 (GMT)
commit92e6692ca703bba1e6f2f145b4a6b59fcdd75491 (patch)
treead5afe26575fb1f57d186fe143b9ad4fc867d6c2
parentfa8ed7041dd3b74dddf089baa8ca7275483a6e24 (diff)
Explicitely clear a QVector from its items, qDeleteAll does not do that
-rw-r--r--src/lib/marble/geodata/data/GeoDataContainer_p.h1
-rw-r--r--src/lib/marble/geodata/data/GeoDataMultiGeometry_p.h1
-rw-r--r--src/lib/marble/geodata/data/GeoDataMultiTrack_p.h1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/marble/geodata/data/GeoDataContainer_p.h b/src/lib/marble/geodata/data/GeoDataContainer_p.h
index 96f140d..ec0a27f 100644
--- a/src/lib/marble/geodata/data/GeoDataContainer_p.h
+++ b/src/lib/marble/geodata/data/GeoDataContainer_p.h
@@ -34,6 +34,7 @@ class GeoDataContainerPrivate : public GeoDataFeaturePrivate
{
GeoDataFeaturePrivate::operator=( other );
qDeleteAll( m_vector );
+ m_vector.clear();
m_vector.reserve(other.m_vector.size());
foreach( GeoDataFeature *feature, other.m_vector )
{
diff --git a/src/lib/marble/geodata/data/GeoDataMultiGeometry_p.h b/src/lib/marble/geodata/data/GeoDataMultiGeometry_p.h
index be48135..ccd8d2d 100644
--- a/src/lib/marble/geodata/data/GeoDataMultiGeometry_p.h
+++ b/src/lib/marble/geodata/data/GeoDataMultiGeometry_p.h
@@ -43,6 +43,7 @@ class GeoDataMultiGeometryPrivate : public GeoDataGeometryPrivate
GeoDataGeometryPrivate::operator=( other );
qDeleteAll( m_vector );
+ m_vector.clear();
m_vector.reserve(other.m_vector.size());
diff --git a/src/lib/marble/geodata/data/GeoDataMultiTrack_p.h b/src/lib/marble/geodata/data/GeoDataMultiTrack_p.h
index 80eda22..2d97e0f 100644
--- a/src/lib/marble/geodata/data/GeoDataMultiTrack_p.h
+++ b/src/lib/marble/geodata/data/GeoDataMultiTrack_p.h
@@ -35,6 +35,7 @@ class GeoDataMultiTrackPrivate : public GeoDataGeometryPrivate
GeoDataGeometryPrivate::operator=( other );
qDeleteAll( m_vector );
+ m_vector.clear();
m_vector.reserve(other.m_vector.size());
foreach( GeoDataTrack *track, other.m_vector ) {