diff options
author | Albin Olsson <albin.olsson@cybercom.com> | 2013-09-04 13:19:32 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-04 16:30:02 +0200 |
commit | e31739e1b6d24616654b03d30bcdf6aeba037117 (patch) | |
tree | 280e626b270c8fa54bf21204288341c9788a29ed | |
parent | 8f9b145b743764032f21dc9dc576347fd4a96532 (diff) |
Fix broken polygonline and polygonitem for ARM.
Routes drawn on map became broken after pinch-zooming. Root cause was
inconsistent use of floating point types that only affects ARM
architecture. Fix is to switch double to qreal declarations.
I believe a more thorough review of the uses of doubles in QtLocation
needs to be done. See QTBUG-33331.
Change-Id: I72411d304d2e9183d415c2afdf0a31b80a4ad2a6
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
-rw-r--r-- | src/imports/location/qdeclarativepolygonmapitem.cpp | 2 | ||||
-rw-r--r-- | src/imports/location/qdeclarativepolylinemapitem.cpp | 2 | ||||
-rw-r--r-- | src/imports/location/qdeclarativerectanglemapitem.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/imports/location/qdeclarativepolygonmapitem.cpp b/src/imports/location/qdeclarativepolygonmapitem.cpp index c10fe03a..b1e43397 100644 --- a/src/imports/location/qdeclarativepolygonmapitem.cpp +++ b/src/imports/location/qdeclarativepolygonmapitem.cpp @@ -163,7 +163,7 @@ void QGeoMapPolygonGeometry::updateSourcePoints(const QGeoMap &map, QPointF lastPoint; srcPath_ = QPainterPath(); - double unwrapBelowX = 0; + qreal unwrapBelowX = 0; if (preserveGeometry_ ) unwrapBelowX = map.coordinateToScreenPosition(geoLeftBound_, false).x(); diff --git a/src/imports/location/qdeclarativepolylinemapitem.cpp b/src/imports/location/qdeclarativepolylinemapitem.cpp index 144f55ec..23713561 100644 --- a/src/imports/location/qdeclarativepolylinemapitem.cpp +++ b/src/imports/location/qdeclarativepolylinemapitem.cpp @@ -206,7 +206,7 @@ void QGeoMapPolylineGeometry::updateSourcePoints(const QGeoMap &map, QPointF origin, lastPoint, lastAddedPoint; - double unwrapBelowX = 0; + qreal unwrapBelowX = 0; if (preserveGeometry_) unwrapBelowX = map.coordinateToScreenPosition(geoLeftBound_, false).x(); diff --git a/src/imports/location/qdeclarativerectanglemapitem.cpp b/src/imports/location/qdeclarativerectanglemapitem.cpp index 8573ec51..d1654e41 100644 --- a/src/imports/location/qdeclarativerectanglemapitem.cpp +++ b/src/imports/location/qdeclarativerectanglemapitem.cpp @@ -147,7 +147,7 @@ void QGeoMapRectangleGeometry::updatePoints(const QGeoMap &map, return; if ( preserveGeometry_ ) { - double unwrapBelowX = map.coordinateToScreenPosition(geoLeftBound_, false).x(); + qreal unwrapBelowX = map.coordinateToScreenPosition(geoLeftBound_, false).x(); if (br.x() < unwrapBelowX) br.setX(tl.x() + screenBounds_.width()); } |