summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp')
-rw-r--r--tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
index ea08af7608..f2e6973e27 100644
--- a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
@@ -33,10 +33,7 @@
#include <QImage>
#include <QPaintEngine>
#include <QTileRules>
-#include <math.h>
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
+#include <qmath.h>
#include <private/qpixmap_raster_p.h>
@@ -1232,7 +1229,7 @@ QTransform tst_QPainter::transformForAngle(qreal angle)
QTransform rotTrans2;
rotTrans2.translate(40, 0);
- qreal rad = angle * 2. * M_PI / 360.;
+ qreal rad = qDegreesToRadians(angle);
qreal c = ::cos(rad);
qreal s = ::sin(rad);