aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickpincharea.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-02-13 12:02:19 +0100
committerSean Harmer <sean.harmer@kdab.com>2015-02-19 10:49:03 +0000
commit373ce8878321aa561b55131bada78ad4a2ce8427 (patch)
tree0b64429ea79163f1f13b4073bbe60040047d0540 /src/quick/items/qquickpincharea.cpp
parent6f264b755501fd322d1e357187b42120210a7ba3 (diff)
Cleanup math function includes and usage
Use std::math on floats and doubles, and qMath on qreals, and only include the math headers actually needed. Change-Id: I1d511d7b1bac0050eaa947c7baee760b736858bf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/quick/items/qquickpincharea.cpp')
-rw-r--r--src/quick/items/qquickpincharea.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/items/qquickpincharea.cpp b/src/quick/items/qquickpincharea.cpp
index 5c3916cfc4..33f4bade3a 100644
--- a/src/quick/items/qquickpincharea.cpp
+++ b/src/quick/items/qquickpincharea.cpp
@@ -34,6 +34,7 @@
#include "qquickpincharea_p_p.h"
#include "qquickwindow.h"
+#include <QtCore/qmath.h>
#include <QtGui/qevent.h>
#include <QtGui/qguiapplication.h>
#include <QtGui/qstylehints.h>
@@ -43,7 +44,6 @@
#include <QVariant>
#include <float.h>
-#include <math.h>
QT_BEGIN_NAMESPACE
@@ -455,7 +455,7 @@ void QQuickPinchArea::updatePinch()
QPointF p2 = touchPoint2.scenePos();
qreal dx = p1.x() - p2.x();
qreal dy = p1.y() - p2.y();
- qreal dist = sqrt(dx*dx + dy*dy);
+ qreal dist = qSqrt(dx*dx + dy*dy);
QPointF sceneCenter = (p1 + p2)/2;
qreal angle = QLineF(p1, p2).angle();
if (d->touchPoints.count() == 1) {