summaryrefslogtreecommitdiff
path: root/src/positioning/qdoublevector2d_p.h
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2013-11-14 14:02:34 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-19 08:33:37 +0100
commitb066db2208c976a66f08fbae33e37de94da9c89b (patch)
tree931378c47e47ad2e21e7719a6d4192e523debe15 /src/positioning/qdoublevector2d_p.h
parent59922ec4e84aa35ee7ffc8bacf940745467700fe (diff)
downloadqtlocation-b066db2208c976a66f08fbae33e37de94da9c89b.tar.gz
Fix ambiguous type conversion options (QPointF vs QDoubleVector)
qdeclarativegeomapgesturearea.cpp: In member function 'void QDeclarativeGeoMapGestureArea::startTwoTouchPoints()': qdeclarativegeomapgesturearea.cpp:834:66: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: [enabled by default] QPointF startPos = (sceneStartPoint1_ + sceneStartPoint2_) * 0.5; ^ In file included from /home/ablasche/dev/qt/androidqt/qtbase/include/QtCore/qpoint.h:1:0, from /home/ablasche/dev/qt/androidqt/qtbase/include/QtCore/../../src/corelib/tools/qrect.h:46, from /home/ablasche/dev/qt/androidqt/qtbase/include/QtCore/qrect.h:1, from /home/ablasche/dev/qt/androidqt/qtbase/include/QtGui/../../src/gui/painting/qregion.h:46, from /home/ablasche/dev/qt/androidqt/qtbase/include/QtGui/qregion.h:1, from /home/ablasche/dev/qt/androidqt/qtbase/include/QtGui/../../src/gui/kernel/qevent.h:47, from /home/ablasche/dev/qt/androidqt/qtbase/include/QtGui/qevent.h:1, from /home/ablasche/dev/qt/androidqt/qtbase/include/QtGui/QTouchEvent:1, from qdeclarativegeomapgesturearea_p.h:46, from qdeclarativegeomapgesturearea.cpp:42: /home/ablasche/dev/qt/androidqt/qtbase/include/QtCore/../../src/corelib/tools/qpoint.h:357:39: note: candidate 1: constexpr const QPointF operator*(const QPointF&, qreal) Q_DECL_CONSTEXPR inline const QPointF operator*(const QPointF &p, qreal c) ^ In file included from /home/ablasche/dev/qt/androidqt/qtbase/include/QtPositioning/5.3.0/QtPositioning/private/qdoublevector2d_p.h:1:0, from ../../location/maps/qgeomap_p.h:59, from qdeclarativegeomap_p.h:73, from qdeclarativegeomapgesturearea.cpp:43: /home/ablasche/dev/qt/androidqt/qtbase/include/QtPositioning/5.3.0/QtPositioning/private/../../../../../../qtlocation/src/positioning/qdoublevector2d_p.h:208:30: note: candidate 2: const QDoubleVector2D operator*(const QDoubleVector2D&, double) inline const QDoubleVector2D operator*(const QDoubleVector2D &vector, double factor) ^ Change-Id: Ic9f56a14f5222b54f24443f3546b97f88a3dcf53 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/positioning/qdoublevector2d_p.h')
-rw-r--r--src/positioning/qdoublevector2d_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/positioning/qdoublevector2d_p.h b/src/positioning/qdoublevector2d_p.h
index 08eb0f92..74a0fb18 100644
--- a/src/positioning/qdoublevector2d_p.h
+++ b/src/positioning/qdoublevector2d_p.h
@@ -70,7 +70,7 @@ class Q_POSITIONING_EXPORT_PRIVATE QDoubleVector2D
public:
QDoubleVector2D();
QDoubleVector2D(double xpos, double ypos);
- QDoubleVector2D(const QPointF &p);
+ explicit QDoubleVector2D(const QPointF &p);
explicit QDoubleVector2D(const QDoubleVector3D &vector);
#ifdef QT_BUILD_LOCATION_LIB
explicit QDoubleVector2D(const QVector2D &vector) : xp(vector.x()), yp(vector.y()) {}