summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2011-12-29 17:59:01 -0200
committerQt by Nokia <qt-info@nokia.com>2012-03-22 18:59:45 +0100
commit31f9df520527be3f7a0f45092dbb5bc9ed1700ff (patch)
treeb0ef3fa099bb5ee3b182d798837c0062b6ee03cf /src
parent76f2aa139a7276278fb962de79fcf0a94bf063df (diff)
Fix compilation on ARM with C++11: narrowing conversion
Cannot have double-to-float conversions inside { } in C++11. Change-Id: I13c27307efd703420b6667d919bb42c2ee82e6cc Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qpaintengineex.cpp2
-rw-r--r--src/gui/painting/qpainterpath.cpp2
-rw-r--r--src/gui/painting/qpainterpath_p.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index 36414f4774..7f9f82d00a 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -870,7 +870,7 @@ void QPaintEngineEx::drawPoints(const QPointF *points, int pointCount)
}
} else {
for (int i=0; i<pointCount; ++i) {
- qreal pts[] = { points[i].x(), points[i].y(), points[i].x() + 1/63., points[i].y() };
+ qreal pts[] = { points[i].x(), points[i].y(), points[i].x() + qreal(1/63.), points[i].y() };
QVectorPath path(pts, 2, 0);
stroke(path, pen);
}
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index eb67709318..e098e7c761 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 23e8332f19..a9068f3855 100644
--- a/src/gui/painting/qpainterpath_p.h
+++ b/src/gui/painting/qpainterpath_p.h
@@ -268,7 +268,7 @@ inline void QPainterPathData::maybeMoveTo()
}
}
-#define KAPPA 0.5522847498
+#define KAPPA qreal(0.5522847498)
QT_END_NAMESPACE