summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativelistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativelistview.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 6a91e5f..44d6a1a 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -1457,14 +1457,14 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
// the initial flick - estimate boundary
qreal accel = deceleration;
qreal v2 = v * v;
- overshootDist = 0.0;
+ overshootDist = qreal(0.0);
// + averageSize/4 to encourage moving at least one item in the flick direction
- qreal dist = v2 / (accel * 2.0) + averageSize/4;
+ qreal dist = v2 / (accel * qreal(2.0)) + averageSize/4;
if (maxDistance > 0)
dist = qMin(dist, maxDistance);
if (v > 0)
dist = -dist;
- if ((maxDistance > 0.0 && v2 / (2.0f * maxDistance) < accel) || snapMode == QDeclarativeListView::SnapOneItem) {
+ if ((maxDistance > qreal(0.0) && v2 / (2.0f * maxDistance) < accel) || snapMode == QDeclarativeListView::SnapOneItem) {
if (snapMode != QDeclarativeListView::SnapOneItem) {
qreal distTemp = isRightToLeft() ? -dist : dist;
data.flickTarget = -snapPosAt(-(dataValue - highlightStart) + distTemp) + highlightStart;