diff options
-rw-r--r-- | .qmake.conf | 2 | ||||
-rw-r--r-- | examples/script/context2d/context2d.cpp | 12 | ||||
-rw-r--r-- | qtscript.pro | 2 |
3 files changed, 6 insertions, 10 deletions
diff --git a/.qmake.conf b/.qmake.conf index f3e186f..87e921f 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -3,4 +3,4 @@ android|boot2qt: CONFIG -= headersclean DEFINES += QT_NO_FOREACH -MODULE_VERSION = 5.9.2 +MODULE_VERSION = 5.10.0 diff --git a/examples/script/context2d/context2d.cpp b/examples/script/context2d/context2d.cpp index 70ef104..ddb40b7 100644 --- a/examples/script/context2d/context2d.cpp +++ b/examples/script/context2d/context2d.cpp @@ -41,11 +41,7 @@ #include "context2d.h" #include <QVariant> - -#include <math.h> -static const double Q_PI = 3.14159265358979323846; // pi - -#define DEGREES(t) ((t) * 180.0 / Q_PI) +#include <qmath.h> #define qClamp(val, min, max) qMin(qMax(val, min), max) static QList<qreal> parseNumbersList(QString::const_iterator &itr) @@ -224,7 +220,7 @@ void Context2D::scale(qreal x, qreal y) void Context2D::rotate(qreal angle) { - m_state.matrix.rotate(DEGREES(angle)); + m_state.matrix.rotate(qRadiansToDegrees(angle)); m_state.flags |= DirtyTransformationMatrix; } @@ -573,8 +569,8 @@ void Context2D::arc(qreal xc, qreal yc, qreal radius, anticlockwise = !anticlockwise; //end hack - float sa = DEGREES(sar); - float ea = DEGREES(ear); + float sa = qRadiansToDegrees(sar); + float ea = qRadiansToDegrees(ear); double span = 0; diff --git a/qtscript.pro b/qtscript.pro index 73de3cb..96cfa4c 100644 --- a/qtscript.pro +++ b/qtscript.pro @@ -1,3 +1,3 @@ -requires(!integrity:!winrt) +requires(!integrity:!winrt:!tvos:!watchos) load(qt_parts) |