summaryrefslogtreecommitdiffstats
path: root/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-03-17 12:37:56 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-03-17 12:37:56 (GMT)
commitc950a2594f7c3102930541800edac5384827846d (patch)
treeffd520c7e46a1e1adda21ade80d381893e13ad46 /tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
parente1915815bc5ef86b3844608bba46769da5173363 (diff)
parentf95d1dbd840c4959085ec44d24409ba134a05cd0 (diff)
downloadQt-c950a2594f7c3102930541800edac5384827846d.zip
Qt-c950a2594f7c3102930541800edac5384827846d.tar.gz
Qt-c950a2594f7c3102930541800edac5384827846d.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6
Diffstat (limited to 'tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp')
-rw-r--r--tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp b/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
index fb0f3e0..d2d86fb 100644
--- a/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
+++ b/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
@@ -75,6 +75,8 @@ private slots:
void loopCount();
void autoAdd();
void pauseResume();
+
+ void QTBUG8910_crashWhenRemovingUncontrolledAnimation();
};
tst_QParallelAnimationGroup::tst_QParallelAnimationGroup()
@@ -999,9 +1001,22 @@ void tst_QParallelAnimationGroup::pauseResume()
QCOMPARE(spy.count(), 2); //this shouldn't have changed
group.resume();
QCOMPARE(spy.count(), 2); //this shouldn't have changed
+}
-
+void tst_QParallelAnimationGroup::QTBUG8910_crashWhenRemovingUncontrolledAnimation()
+{
+ QParallelAnimationGroup group;
+ TestAnimation *anim = new TestAnimation;
+ anim->setLoopCount(-1);
+ TestAnimation *anim2 = new TestAnimation;
+ anim2->setLoopCount(-1);
+ group.addAnimation(anim);
+ group.addAnimation(anim2);
+ group.start();
+ delete anim;
+ // it would crash here because the internals of the group would still have a reference to anim
+ delete anim2;
}