summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-11-11 01:38:21 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-11-11 01:38:21 (GMT)
commit0de7d028b8ec71109d4d3eba7d15d704e42d76da (patch)
tree6c0efab1f503066ecf5eaca3d734ae96f1350192 /src
parentd6842127e96bd71f46057d16bfbcb7b5c019b35c (diff)
parent6487fddcee67c09ed20f83353f753912eed181a0 (diff)
downloadQt-0de7d028b8ec71109d4d3eba7d15d704e42d76da.zip
Qt-0de7d028b8ec71109d4d3eba7d15d704e42d76da.tar.gz
Qt-0de7d028b8ec71109d4d3eba7d15d704e42d76da.tar.bz2
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src')
-rw-r--r--src/corelib/animation/qabstractanimation.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index be99b3b..185d8e5 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -205,6 +205,7 @@ void QUnifiedTimer::updateAnimationsTime()
QAbstractAnimation *animation = animations.at(currentAnimationIdx);
int elapsed = QAbstractAnimationPrivate::get(animation)->totalCurrentTime
+ (animation->direction() == QAbstractAnimation::Forward ? delta : -delta);
+ //qWarning() << "SCT" << elapsed;
animation->setCurrentTime(elapsed);
}
currentAnimationIdx = 0;
@@ -229,7 +230,9 @@ void QUnifiedTimer::restartAnimationTimer()
void QUnifiedTimer::timerEvent(QTimerEvent *event)
{
- if (event->timerId() == startStopAnimationTimer.timerId()) {
+ if ((consistentTiming && startStopAnimationTimer.isActive()) ||
+ (event->timerId() == startStopAnimationTimer.timerId())) {
+ //qWarning() << "A SSAT";
startStopAnimationTimer.stop();
//we transfer the waiting animations into the "really running" state
@@ -247,8 +250,11 @@ 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
+ //qWarning() << "A AT";
updateAnimationsTime();
restartAnimationTimer();
}
@@ -261,8 +267,10 @@ void QUnifiedTimer::registerAnimation(QAbstractAnimation *animation, bool isTopL
Q_ASSERT(!QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer);
QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer = true;
animationsToStart << animation;
- if (!startStopAnimationTimer.isActive())
+ if (!startStopAnimationTimer.isActive()) {
+ //qWarning("Starting SSAT 1");
startStopAnimationTimer.start(STARTSTOP_TIMER_DELAY, this);
+ }
}
}
@@ -280,8 +288,10 @@ void QUnifiedTimer::unregisterAnimation(QAbstractAnimation *animation)
if (idx <= currentAnimationIdx)
--currentAnimationIdx;
- if (animations.isEmpty() && !startStopAnimationTimer.isActive())
+ if (animations.isEmpty() && !startStopAnimationTimer.isActive()) {
+ //qWarning("Starting SSAT 2");
startStopAnimationTimer.start(STARTSTOP_TIMER_DELAY, this);
+ }
} else {
animationsToStart.removeOne(animation);
}