path: root/src/corelib/animation
diff options
authorMichael Brasser <>2011-12-14 10:29:34 +1000
committerQt by Nokia <>2011-12-14 02:16:40 +0100
commita9ad8886fe25276ea6e81e191392d4c90d207759 (patch)
treedb6e10a7403a48e655e1c4846e9b327cb67c07a0 /src/corelib/animation
parent3ed0a233231a94cd8adb2fe8dfa212caece0085b (diff)
Fix possible jump in animation timer.
When starting new animations with existing animations running, ensure we force an update to the timer first, so that the new animations can't mistakenly start with a very large delta. This fixes tst_qdeclarativeanimations::alwaysRunToEndRestartBug failure on slow machines. Change-Id: Ida4e5dcf0ff792e6bfe0d244b6e969d04d0b20fa Reviewed-by: Martin Jones <>
Diffstat (limited to 'src/corelib/animation')
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index 71eb9c9f9c..a7d428384a 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -286,6 +286,10 @@ void QUnifiedTimer::setTimingInterval(int interval)
void QUnifiedTimer::startAnimations()
startAnimationPending = false;
+ //force timer to update, which prevents large deltas for our newly added animations
+ if (!animations.isEmpty())
+ updateAnimationsTime(-1);
//we transfer the waiting animations into the "really running" state
animations += animationsToStart;