summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-11-25 09:12:51 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-11-25 09:14:38 (GMT)
commit503f9eb56d16dcf2a44ad491da8b17b2aea72d7d (patch)
treeb6514ab51967cf2ee0d48886c48883f53e1c16a5
parentacf398f764a7d73f5857d4544df4e06bfe60797a (diff)
downloadQt-503f9eb56d16dcf2a44ad491da8b17b2aea72d7d.zip
Qt-503f9eb56d16dcf2a44ad491da8b17b2aea72d7d.tar.gz
Qt-503f9eb56d16dcf2a44ad491da8b17b2aea72d7d.tar.bz2
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
-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 ef4989b..299585a 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();