diff options
Diffstat (limited to 'src/gui/painting/qpaintengineex.cpp')
-rw-r--r-- | src/gui/painting/qpaintengineex.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp index 6df410b..eaedc4c 100644 --- a/src/gui/painting/qpaintengineex.cpp +++ b/src/gui/painting/qpaintengineex.cpp @@ -748,8 +748,8 @@ void QPaintEngineEx::drawRoundedRect(const QRectF &rect, qreal xRadius, qreal yR qreal y2 = rect.bottom(); if (mode == Qt::RelativeSize) { - xRadius = xRadius * rect.width() / 200.; - yRadius = yRadius * rect.height() / 200.; + xRadius = xRadius * rect.width() / qreal(200.); + yRadius = yRadius * rect.height() / qreal(200.); } xRadius = qMin(xRadius, rect.width() / 2); @@ -863,7 +863,7 @@ void QPaintEngineEx::drawPoints(const QPointF *points, int pointCount) for (int i=0; i<count; ++i) { pts[++oset] = points[i].x(); pts[++oset] = points[i].y(); - pts[++oset] = points[i].x() + 1/63.; + pts[++oset] = points[i].x() + 1/qreal(63.); pts[++oset] = points[i].y(); } QVectorPath path(pts, count * 2, qpaintengineex_line_types_16, QVectorPath::LinesHint); @@ -873,7 +873,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() + 1/qreal(63.), points[i].y() }; QVectorPath path(pts, 2, 0); stroke(path, pen); } @@ -894,7 +894,7 @@ void QPaintEngineEx::drawPoints(const QPoint *points, int pointCount) for (int i=0; i<count; ++i) { pts[++oset] = points[i].x(); pts[++oset] = points[i].y(); - pts[++oset] = points[i].x() + 1/63.; + pts[++oset] = points[i].x() + 1/qreal(63.); pts[++oset] = points[i].y(); } QVectorPath path(pts, count * 2, qpaintengineex_line_types_16, QVectorPath::LinesHint); @@ -905,7 +905,7 @@ void QPaintEngineEx::drawPoints(const QPoint *points, int pointCount) } else { for (int i=0; i<pointCount; ++i) { qreal pts[] = { qreal(points[i].x()), qreal(points[i].y()), - qreal(points[i].x() +1/63.), qreal(points[i].y()) }; + qreal(points[i].x() +1/qreal(63.)), qreal(points[i].y()) }; QVectorPath path(pts, 2, 0); stroke(path, pen); } |