From 0db3ea4048fe572a256deb343ea5e64a55d98de9 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Thu, 11 Sep 2014 14:36:53 +0200 Subject: Use a dedicated timer for the animation driver. QUnifiedTimer::elapsed() was implemented using driverStartTime + time.elapsed() while the driver was running, but time.elapsed already contains driverStartTime so that was counted twice. This caused repeating timers to fire immediately once they first had fired, if the animation driver was started while it was running. Separate the two timers. Animation driver time restarts from 0 every time it starts. Change-Id: Icf5cd0381b121b2355d7c6ec3edd0997721cbcdf Task-number: QTBUG-41198 Reviewed-by: Michael Brasser --- src/corelib/animation/qabstractanimation_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/corelib/animation/qabstractanimation_p.h') diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h index 6e71356c4c..2b36a678bc 100644 --- a/src/corelib/animation/qabstractanimation_p.h +++ b/src/corelib/animation/qabstractanimation_p.h @@ -133,6 +133,7 @@ class Q_CORE_EXPORT QAnimationDriverPrivate : public QObjectPrivate { public: QAnimationDriverPrivate() : running(false) {} + QElapsedTimer timer; bool running; }; -- cgit v1.2.3