diff options
Diffstat (limited to 'src/corelib/animation/qabstractanimation.cpp')
-rw-r--r-- | src/corelib/animation/qabstractanimation.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 28a09ee2e4..4e9ee5c3f9 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -877,6 +877,7 @@ void QAnimationDriver::start() Q_D(QAnimationDriver); if (!d->running) { d->running = true; + d->timer.start(); emit started(); } } @@ -900,9 +901,8 @@ void QAnimationDriver::stop() qint64 QAnimationDriver::elapsed() const { - // The default implementation picks up the elapsed time from the - // unified timer and can ignore the time offset. - return QUnifiedTimer::instance()->time.elapsed(); + Q_D(const QAnimationDriver); + return d->running ? d->timer.elapsed() : 0; } /*! |