summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-10-09 02:44:38 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-10-09 02:44:38 (GMT)
commit3a0cb6ebef245780782fcab6709e471d26789590 (patch)
treeec93f99dc4adc75ec2cde2ee89e4df88c8ec75e9 /src/corelib
parent8cefc95e3d91cb16ef6a7b16c18ef1e23a3911a9 (diff)
parent91c85c76d83260d794701100b36a0cc04f848932 (diff)
downloadQt-3a0cb6ebef245780782fcab6709e471d26789590.zip
Qt-3a0cb6ebef245780782fcab6709e471d26789590.tar.gz
Qt-3a0cb6ebef245780782fcab6709e471d26789590.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
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;
}