From a40be66a9fba7e1c3738b848c4dfd8adeeca54f2 Mon Sep 17 00:00:00 2001 From: David Laing Date: Fri, 3 Feb 2012 16:36:09 +1000 Subject: Corrects for some uninitialized variable usage. Thanks to valgrind for the warnings. Change-Id: Id1ca2b3560f2f1e470844454be0d0e9f7729db2b Reviewed-by: Alex --- src/location/maps/qgeocameradata.cpp | 5 +++-- src/location/maps/qgeocameratiles.cpp | 4 +++- src/location/maps/qgeomap.cpp | 5 ++++- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src/location/maps') diff --git a/src/location/maps/qgeocameradata.cpp b/src/location/maps/qgeocameradata.cpp index da6cbe5c..9ce169dd 100644 --- a/src/location/maps/qgeocameradata.cpp +++ b/src/location/maps/qgeocameradata.cpp @@ -76,12 +76,13 @@ public: QGeoCameraDataPrivate::QGeoCameraDataPrivate() : QSharedData(), center_(-27.5, 153), - distance_(0.02), + distance_(0.0), bearing_(0.0), tilt_(0.0), roll_(0.0), aspectRatio_(1.0), - zoomLevel_(9) {} + zoomLevel_(9), + zoomFactor_(9.0) {} QGeoCameraDataPrivate::QGeoCameraDataPrivate(const QGeoCameraDataPrivate &rhs) : QSharedData(rhs), diff --git a/src/location/maps/qgeocameratiles.cpp b/src/location/maps/qgeocameratiles.cpp index 73e40a22..19f40799 100644 --- a/src/location/maps/qgeocameratiles.cpp +++ b/src/location/maps/qgeocameratiles.cpp @@ -210,7 +210,9 @@ QPair, QSet > QGeoCameraTiles::tilesSplitByDate return QPair, QSet >(d->tilesLeft_, d->tilesRight_); } -QGeoCameraTilesPrivate::QGeoCameraTilesPrivate() {} +QGeoCameraTilesPrivate::QGeoCameraTilesPrivate() + : tileSize_(0), + maxZoom_(0) {} QGeoCameraTilesPrivate::~QGeoCameraTilesPrivate() {} diff --git a/src/location/maps/qgeomap.cpp b/src/location/maps/qgeomap.cpp index 4abdcee6..5f57c299 100644 --- a/src/location/maps/qgeomap.cpp +++ b/src/location/maps/qgeomap.cpp @@ -199,7 +199,10 @@ const QGeoMapType QGeoMap::activeMapType() const } QGeoMapPrivate::QGeoMapPrivate(QGeoMap *parent, QGeoTileCache *cache) - : map_(parent), + : width_(0), + height_(0), + aspectRatio_(0.0), + map_(parent), cache_(cache), manager_(0), controller_(0), -- cgit v1.2.1