summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/painting/qpainterpath
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-03-09 10:54:27 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-03-09 11:23:24 +0000
commit1edd16879c238d36d75843be3b54bb20925eeedc (patch)
treefc001b3027830393f0e67da9de96ca985ad2d904 /tests/auto/gui/painting/qpainterpath
parent3fea1e53a14775a45e105efaf95066a8f1af5c18 (diff)
Fix building tests on QNX
Use qmath and cmath methods instead of math.h methods. Change-Id: I86ee2465c999822bf00a7cefee1642c4c30590a6 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Diffstat (limited to 'tests/auto/gui/painting/qpainterpath')
-rw-r--r--tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
index 4252561001..0a073f5c84 100644
--- a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
+++ b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
@@ -895,12 +895,6 @@ void tst_QPainterPath::operators()
QCOMPARE(test, expected);
}
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-#define ANGLE(t) ((t) * 2 * M_PI / 360.0)
-
-
static inline bool pathFuzzyCompare(double p1, double p2)
{
return qAbs(p1 - p2) < 0.001;
@@ -931,7 +925,7 @@ void tst_QPainterPath::testArcMoveTo()
qreal y_radius = rect.height() / 2.0;
QPointF shouldBe = rect.center()
- + QPointF(x_radius * cos(ANGLE(angle)), -y_radius * sin(ANGLE(angle)));
+ + QPointF(x_radius * qCos(qDegreesToRadians(angle)), -y_radius * qSin(qDegreesToRadians(angle)));
qreal iw = 1 / rect.width();
qreal ih = 1 / rect.height();