summaryrefslogtreecommitdiff
path: root/src/corelib/animation
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-11-25 10:12:51 +0100
committerThierry Bastian <thierry.bastian@nokia.com>2009-11-25 10:14:38 +0100
commit503f9eb56d16dcf2a44ad491da8b17b2aea72d7d (patch)
treeb6514ab51967cf2ee0d48886c48883f53e1c16a5 /src/corelib/animation
parentacf398f764a7d73f5857d4544df4e06bfe60797a (diff)
downloadqt4-tools-503f9eb56d16dcf2a44ad491da8b17b2aea72d7d.tar.gz
Make the animation timer more consistent
We ensure that the startStop timer is always ticking before the animation timer. Task-number: QTBUG-5967 Reviewed-by: Aaron Kennedy
Diffstat (limited to 'src/corelib/animation')
-rw-r--r--src/corelib/animation/qabstractanimation.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index ef4989bc4f..299585a0de 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -229,7 +229,10 @@ void QUnifiedTimer::restartAnimationTimer()
void QUnifiedTimer::timerEvent(QTimerEvent *event)
{
- if (event->timerId() == startStopAnimationTimer.timerId()) {
+ //in the case of consistent timing we make sure the orders in which events come is always the same
+ //for that purpose we do as if the startstoptimer would always fire before the animation timer
+ if ((consistentTiming && startStopAnimationTimer.isActive()) ||
+ event->timerId() == startStopAnimationTimer.timerId()) {
startStopAnimationTimer.stop();
//we transfer the waiting animations into the "really running" state
@@ -247,7 +250,9 @@ void QUnifiedTimer::timerEvent(QTimerEvent *event)
time.start();
}
}
- } else if (event->timerId() == animationTimer.timerId()) {
+ }
+
+ if (event->timerId() == animationTimer.timerId()) {
// update current time on all top level animations
updateAnimationsTime();
restartAnimationTimer();