diff options
author | Marc Mutz <marc.mutz.qnx@kdab.com> | 2012-07-02 09:45:10 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-05 15:32:56 (GMT) |
commit | 02d31133a93bc157362251241788196da45aacce (patch) | |
tree | 5c94901004e9b2d0bfa752c780966501d11e7a18 | |
parent | f531f865084d6858ac5de19bf99b4bdabb39e735 (diff) | |
download | Qt-02d31133a93bc157362251241788196da45aacce.zip Qt-02d31133a93bc157362251241788196da45aacce.tar.gz Qt-02d31133a93bc157362251241788196da45aacce.tar.bz2 |
ARM: fix compilation with C++11 enabled
C++11 makes narrowing initialisation using {}s an error.
For an ARM target qreal != double, so force-cast to
qreal.
KAPPA now is consistent with the define of the same name
in qbezier.cpp.
Change-Id: I506218ee1f8cd0cdee21791cc402a479a429f7e5
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
-rw-r--r-- | src/gui/painting/qpainterpath.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qpainterpath_p.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index 277e019..5bc7579 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -2399,7 +2399,7 @@ QDataStream &operator>>(QDataStream &s, QPainterPath &p) #endif continue; } - QPainterPath::Element elm = { x, y, QPainterPath::ElementType(type) }; + QPainterPath::Element elm = { qreal(x), qreal(y), QPainterPath::ElementType(type) }; p.d_func()->elements.append(elm); } s >> p.d_func()->cStart; diff --git a/src/gui/painting/qpainterpath_p.h b/src/gui/painting/qpainterpath_p.h index e0ee047..66dd0b0 100644 --- a/src/gui/painting/qpainterpath_p.h +++ b/src/gui/painting/qpainterpath_p.h @@ -270,7 +270,7 @@ inline void QPainterPathData::maybeMoveTo() } } -#define KAPPA 0.5522847498 +#define KAPPA qreal(0.5522847498) QT_END_NAMESPACE |