aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickgridview.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/qquickgridview.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/qquickgridview.cpp')
-rw-r--r--src/quick/items/qquickgridview.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quick/items/qquickgridview.cpp b/src/quick/items/qquickgridview.cpp
index f3e2e9338f..3cc0a28b87 100644
--- a/src/quick/items/qquickgridview.cpp
+++ b/src/quick/items/qquickgridview.cpp
@@ -41,9 +41,10 @@
#include <QtGui/qevent.h>
#include <QtCore/qmath.h>
#include <QtCore/qcoreapplication.h>
-#include <math.h>
#include "qplatformdefs.h"
+#include <cmath>
+
QT_BEGIN_NAMESPACE
#ifndef QML_FLICK_SNAPONETHRESHOLD
@@ -349,7 +350,7 @@ qreal QQuickGridViewPrivate::snapPosAt(qreal pos) const
pos += highlightStart;
pos += rowSize()/2;
snapPos = static_cast<FxGridItemSG*>(visibleItems.first())->rowPos() - visibleIndex / columns * rowSize();
- snapPos = pos - fmodf(pos - snapPos, qreal(rowSize()));
+ snapPos = pos - std::fmod(pos - snapPos, qreal(rowSize()));
snapPos -= highlightStart;
qreal maxExtent;
qreal minExtent;