diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-05-28 02:53:39 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-05-28 02:53:39 (GMT) |
commit | 5f8312f82ac9ef77c89ef363d9c2e0246b398d20 (patch) | |
tree | 80ce3621258cee5358015fce545447164235c00e /src/declarative/graphicsitems/qdeclarativepathview.cpp | |
parent | 0da1b076bf4e33f239ebe9dc4d8f5363ee24110b (diff) | |
download | Qt-5f8312f82ac9ef77c89ef363d9c2e0246b398d20.zip Qt-5f8312f82ac9ef77c89ef363d9c2e0246b398d20.tar.gz Qt-5f8312f82ac9ef77c89ef363d9c2e0246b398d20.tar.bz2 |
Use QElapsedTimer rather than QTime::elapsed()
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativepathview.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativepathview.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index 3a69f44..448ec06 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -948,7 +948,7 @@ void QDeclarativePathView::mousePressEvent(QGraphicsSceneMouseEvent *event) void QDeclarativePathView::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { Q_D(QDeclarativePathView); - if (!d->interactive || d->lastPosTime.isNull()) + if (!d->interactive || !d->lastPosTime.isValid()) return; if (!d->stealMouse) { @@ -982,7 +982,7 @@ void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *) Q_D(QDeclarativePathView); d->stealMouse = false; setKeepMouseGrab(false); - if (!d->interactive || d->lastPosTime.isNull()) + if (!d->interactive || !d->lastPosTime.isValid()) return; qreal elapsed = qreal(d->lastElapsed + QDeclarativeItemPrivate::elapsed(d->lastPosTime)) / 1000.; @@ -1017,7 +1017,7 @@ void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *) d->fixOffset(); } - d->lastPosTime = QTime(); + d->lastPosTime.invalidate(); ungrabMouse(); } @@ -1059,8 +1059,8 @@ bool QDeclarativePathView::sendMouseEvent(QGraphicsSceneMouseEvent *event) grabMouse(); return d->stealMouse; - } else if (!d->lastPosTime.isNull()) { - d->lastPosTime = QTime(); + } else if (d->lastPosTime.isValid()) { + d->lastPosTime.invalidate(); } return false; } |