summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation/qsequentialanimationgroup.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-18 04:27:25 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-18 04:27:25 (GMT)
commit4dd9931c91aed711a888fb108f9f7225fd3e8045 (patch)
tree8a577565d6ba4fab08d48dbd8b93845fdcc80bc6 /src/corelib/animation/qsequentialanimationgroup.cpp
parentd3c8da01258a963c80f888f4acee722a84618db3 (diff)
parent91b29b3b00ba9292cfcbeb2ac93c4b1f7bed2bd6 (diff)
downloadQt-4dd9931c91aed711a888fb108f9f7225fd3e8045.zip
Qt-4dd9931c91aed711a888fb108f9f7225fd3e8045.tar.gz
Qt-4dd9931c91aed711a888fb108f9f7225fd3e8045.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Optimize getting bearings of a glyph on Windows for true type fonts Fixes blending problem when paiting non-opaque items with cache enabled. Optimize speed of QTextLayout and QPainter::drawText Fix a crash in animation groups when deleting uncontrolled animations
Diffstat (limited to 'src/corelib/animation/qsequentialanimationgroup.cpp')
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/corelib/animation/qsequentialanimationgroup.cpp b/src/corelib/animation/qsequentialanimationgroup.cpp
index 8ab084a..7617c1f 100644
--- a/src/corelib/animation/qsequentialanimationgroup.cpp
+++ b/src/corelib/animation/qsequentialanimationgroup.cpp
@@ -479,7 +479,7 @@ void QSequentialAnimationGroupPrivate::activateCurrentAnimation(bool intermediat
// connects to the finish signal of uncontrolled animations
if (currentAnimation->totalDuration() == -1)
- QObject::connect(currentAnimation, SIGNAL(finished()), q, SLOT(_q_uncontrolledAnimationFinished()));
+ connectUncontrolledAnimation(currentAnimation);
currentAnimation->start();
if (!intermediate && state == QSequentialAnimationGroup::Paused)
@@ -496,7 +496,7 @@ void QSequentialAnimationGroupPrivate::_q_uncontrolledAnimationFinished()
actualDuration.append(-1);
actualDuration[currentAnimationIndex] = currentAnimation->currentTime();
- QObject::disconnect(currentAnimation, SIGNAL(finished()), q, SLOT(_q_uncontrolledAnimationFinished()));
+ disconnectUncontrolledAnimation(currentAnimation);
if ((direction == QAbstractAnimation::Forward && currentAnimation == animations.last())
|| (direction == QAbstractAnimation::Backward && currentAnimationIndex == 0)) {
@@ -543,10 +543,10 @@ void QSequentialAnimationGroupPrivate::animationInsertedAt(int index)
the group at index \a index. The animation is no more listed when this
method is called.
*/
-void QSequentialAnimationGroupPrivate::animationRemovedAt(int index)
+void QSequentialAnimationGroupPrivate::animationRemoved(int index, QAbstractAnimation *anim)
{
Q_Q(QSequentialAnimationGroup);
- QAnimationGroupPrivate::animationRemovedAt(index);
+ QAnimationGroupPrivate::animationRemoved(index, anim);
Q_ASSERT(currentAnimation); // currentAnimation should always be set
@@ -555,7 +555,10 @@ void QSequentialAnimationGroupPrivate::animationRemovedAt(int index)
const int currentIndex = animations.indexOf(currentAnimation);
if (currentIndex == -1) {
- //we're removing the current animation, let's update it to another one
+ //we're removing the current animation
+
+ disconnectUncontrolledAnimation(currentAnimation);
+
if (index < animations.count())
setCurrentAnimation(index); //let's try to take the next one
else if (index > 0)