summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2009-10-09 01:36:11 (GMT)
committerBea Lam <bea.lam@nokia.com>2009-10-09 01:36:11 (GMT)
commit91c85c76d83260d794701100b36a0cc04f848932 (patch)
tree86fd1204ad8358a0a41d8a61307e1d3e1ce16177 /src/corelib
parentccb3f7c3bda46ace7b42bff5a27a11bd07602b68 (diff)
parentdda314e206162215e60dd306b6347a04f19ca5df (diff)
downloadQt-91c85c76d83260d794701100b36a0cc04f848932.zip
Qt-91c85c76d83260d794701100b36a0cc04f848932.tar.gz
Qt-91c85c76d83260d794701100b36a0cc04f848932.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts: examples/declarative/layouts/Button.qml
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/animation/qabstractanimation.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index 2769040..a8c3504 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -231,7 +231,8 @@ void QUnifiedTimer::registerAnimation(QAbstractAnimation *animation)
Q_ASSERT(!QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer);
QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer = true;
animationsToStart << animation;
- startStopAnimationTimer.start(STARTSTOP_TIMER_DELAY, this);
+ if (!startStopAnimationTimer.isActive())
+ startStopAnimationTimer.start(STARTSTOP_TIMER_DELAY, this);
}
void QUnifiedTimer::unregisterAnimation(QAbstractAnimation *animation)
@@ -245,11 +246,12 @@ void QUnifiedTimer::unregisterAnimation(QAbstractAnimation *animation)
// this is needed if we unregister an animation while its running
if (idx <= currentAnimationIdx)
--currentAnimationIdx;
- if (animations.isEmpty())
+ if (animations.isEmpty() && !startStopAnimationTimer.isActive())
startStopAnimationTimer.start(STARTSTOP_TIMER_DELAY, this);
} else {
animationsToStart.removeOne(animation);
}
+
QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer = false;
}