diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-03-25 23:12:26 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-03-25 23:12:26 (GMT) |
commit | de85d147d38acb1d9dd3feacf968c72cb74490e8 (patch) | |
tree | b5791d0d20dfcd6882741d575d6ab98e94610970 /src | |
parent | 11b9190a182c5f3c1055c100145b02a3975509ed (diff) | |
download | Qt-de85d147d38acb1d9dd3feacf968c72cb74490e8.zip Qt-de85d147d38acb1d9dd3feacf968c72cb74490e8.tar.gz Qt-de85d147d38acb1d9dd3feacf968c72cb74490e8.tar.bz2 |
Ensure both qMin() parameters are the same type.
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativepathview.cpp | 2 |
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; |