diff options
author | Jan Arve Sæther <jan-arve.saether@qt.io> | 2017-12-01 11:19:28 +0100 |
---|---|---|
committer | Jan Arve Sæther <jan-arve.saether@qt.io> | 2017-12-02 19:58:30 +0000 |
commit | 0c9e379dd8c57fab9d8e6ba8d35a0dca8ac05a0a (patch) | |
tree | a5a806ddf6ea5728d1f2857e8119a26c787ed1e8 /src | |
parent | 306c32f50e289c401e4636976c97dc2b40fdd69b (diff) |
Use a custom QAnimationDriver to take control over time
This should reduce flakyness of tests.
Change-Id: I26e0a97f7cd3e7cee2ffb44188300c37578cddd7
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/animation/qabstractanimation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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()) ? |