From 0c9e379dd8c57fab9d8e6ba8d35a0dca8ac05a0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Arve=20S=C3=A6ther?= Date: Fri, 1 Dec 2017 11:19:28 +0100 Subject: Use a custom QAnimationDriver to take control over time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should reduce flakyness of tests. Change-Id: I26e0a97f7cd3e7cee2ffb44188300c37578cddd7 Reviewed-by: Jędrzej Nowacki --- src/corelib/animation/qabstractanimation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/animation') diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 2041b8816e..e445037efb 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -299,13 +299,13 @@ void QUnifiedTimer::stopAnimationDriver() driver->stop(); } -void QUnifiedTimer::updateAnimationTimers(qint64) +void QUnifiedTimer::updateAnimationTimers(qint64 currentTick) { //setCurrentTime can get this called again while we're the for loop. At least with pauseAnimations if(insideTick) return; - qint64 totalElapsed = elapsed(); + qint64 totalElapsed = currentTick > 0 ? currentTick : elapsed(); // ignore consistentTiming in case the pause timer is active qint64 delta = (consistentTiming && !pauseTimer.isActive()) ? -- cgit v1.2.3