summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-03-25 23:12:26 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-03-25 23:12:26 (GMT)
commitde85d147d38acb1d9dd3feacf968c72cb74490e8 (patch)
treeb5791d0d20dfcd6882741d575d6ab98e94610970
parent11b9190a182c5f3c1055c100145b02a3975509ed (diff)
downloadQt-de85d147d38acb1d9dd3feacf968c72cb74490e8.zip
Qt-de85d147d38acb1d9dd3feacf968c72cb74490e8.tar.gz
Qt-de85d147d38acb1d9dd3feacf968c72cb74490e8.tar.bz2
Ensure both qMin() parameters are the same type.
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index f3d6137..c98b006 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -772,7 +772,7 @@ void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *)
qreal v2 = velocity*velocity;
qreal accel = d->deceleration;
// + 0.25 to encourage moving at least one item in the flick direction
- qreal dist = qMin(qreal(d->model->count()-1), d->model->count() * v2 / (accel * 2.0) + 0.25);
+ qreal dist = qMin(qreal(d->model->count()-1), qreal(d->model->count()) * v2 / (accel * 2.0) + 0.25);
// round to nearest item.
if (velocity > 0.)
dist = qRound(dist + d->offset) - d->offset;