diff options
Diffstat (limited to 'tests/auto')
4 files changed, 81 insertions, 81 deletions
diff --git a/tests/auto/qanimationgroup/tst_qanimationgroup.cpp b/tests/auto/qanimationgroup/tst_qanimationgroup.cpp index ff5c3b4..a7d616a 100644 --- a/tests/auto/qanimationgroup/tst_qanimationgroup.cpp +++ b/tests/auto/qanimationgroup/tst_qanimationgroup.cpp @@ -207,7 +207,7 @@ void tst_QAnimationGroup::setCurrentTime() QVariantAnimation *a1_s_o1 = new QPropertyAnimation(&s_o1, "value"); QVariantAnimation *a2_s_o1 = new QPropertyAnimation(&s_o1, "value"); QVariantAnimation *a3_s_o1 = new QPropertyAnimation(&s_o1, "value"); - a2_s_o1->setIterationCount(3); + a2_s_o1->setLoopCount(3); sequence->addAnimation(a1_s_o1); sequence->addAnimation(a2_s_o1); sequence->addAnimation(a3_s_o1); @@ -224,7 +224,7 @@ void tst_QAnimationGroup::setCurrentTime() QVariantAnimation *a1_p_o1 = new QPropertyAnimation(&p_o1, "value"); QVariantAnimation *a1_p_o2 = new QPropertyAnimation(&p_o2, "value"); QVariantAnimation *a1_p_o3 = new QPropertyAnimation(&p_o3, "value"); - a1_p_o2->setIterationCount(3); + a1_p_o2->setLoopCount(3); parallel->addAnimation(a1_p_o1); parallel->addAnimation(a1_p_o2); parallel->addAnimation(a1_p_o3); @@ -233,7 +233,7 @@ void tst_QAnimationGroup::setCurrentTime() QCOMPARE(notTimeDriven->totalDuration(), -1); QVariantAnimation *loopsForever = new QPropertyAnimation(&t_o2, "value"); - loopsForever->setIterationCount(-1); + loopsForever->setLoopCount(-1); QCOMPARE(loopsForever->totalDuration(), -1); QParallelAnimationGroup group; @@ -281,11 +281,11 @@ void tst_QAnimationGroup::setCurrentTime() QCOMPARE(a1_s_o3->currentTime(), 0); QCOMPARE(a1_p_o1->currentTime(), 250); QCOMPARE(a1_p_o2->currentTime(), 0); - QCOMPARE(a1_p_o2->currentIteration(), 1); + QCOMPARE(a1_p_o2->currentLoop(), 1); QCOMPARE(a1_p_o3->currentTime(), 250); QCOMPARE(notTimeDriven->currentTime(), 250); QCOMPARE(loopsForever->currentTime(), 0); - QCOMPARE(loopsForever->currentIteration(), 1); + QCOMPARE(loopsForever->currentLoop(), 1); QCOMPARE(sequence->currentAnimation(), a2_s_o1); // Current time = 251 @@ -294,14 +294,14 @@ void tst_QAnimationGroup::setCurrentTime() QCOMPARE(sequence->currentTime(), 251); QCOMPARE(a1_s_o1->currentTime(), 250); QCOMPARE(a2_s_o1->currentTime(), 1); - QCOMPARE(a2_s_o1->currentIteration(), 0); + QCOMPARE(a2_s_o1->currentLoop(), 0); QCOMPARE(a3_s_o1->currentTime(), 0); QCOMPARE(sequence2->currentTime(), 251); QCOMPARE(a1_s_o2->currentTime(), 250); QCOMPARE(a1_s_o3->currentTime(), 1); QCOMPARE(a1_p_o1->currentTime(), 250); QCOMPARE(a1_p_o2->currentTime(), 1); - QCOMPARE(a1_p_o2->currentIteration(), 1); + QCOMPARE(a1_p_o2->currentLoop(), 1); QCOMPARE(a1_p_o3->currentTime(), 250); QCOMPARE(notTimeDriven->currentTime(), 251); QCOMPARE(loopsForever->currentTime(), 1); diff --git a/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp b/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp index c7f33b7..f2ab57a 100644 --- a/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp +++ b/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp @@ -71,8 +71,8 @@ private slots: void startGroupWithRunningChild(); void zeroDurationAnimation(); void stopUncontrolledAnimations(); - void iterationCount_data(); - void iterationCount(); + void loopCount_data(); + void loopCount(); void autoAdd(); }; @@ -194,7 +194,7 @@ void tst_QParallelAnimationGroup::setCurrentTime() QVariantAnimation *a1_p_o1 = new QPropertyAnimation(&p_o1, "value"); QVariantAnimation *a1_p_o2 = new QPropertyAnimation(&p_o2, "value"); QVariantAnimation *a1_p_o3 = new QPropertyAnimation(&p_o3, "value"); - a1_p_o2->setIterationCount(3); + a1_p_o2->setLoopCount(3); parallel->addAnimation(a1_p_o1); parallel->addAnimation(a1_p_o2); parallel->addAnimation(a1_p_o3); @@ -203,7 +203,7 @@ void tst_QParallelAnimationGroup::setCurrentTime() QCOMPARE(notTimeDriven->totalDuration(), -1); QVariantAnimation *loopsForever = new QPropertyAnimation(&t_o2, "value"); - loopsForever->setIterationCount(-1); + loopsForever->setLoopCount(-1); QCOMPARE(loopsForever->totalDuration(), -1); QParallelAnimationGroup group; @@ -233,18 +233,18 @@ void tst_QParallelAnimationGroup::setCurrentTime() QCOMPARE(group.currentTime(), 250); QCOMPARE(a1_p_o1->currentTime(), 250); QCOMPARE(a1_p_o2->currentTime(), 0); - QCOMPARE(a1_p_o2->currentIteration(), 1); + QCOMPARE(a1_p_o2->currentLoop(), 1); QCOMPARE(a1_p_o3->currentTime(), 250); QCOMPARE(notTimeDriven->currentTime(), 250); QCOMPARE(loopsForever->currentTime(), 0); - QCOMPARE(loopsForever->currentIteration(), 1); + QCOMPARE(loopsForever->currentLoop(), 1); // Current time = 251 group.setCurrentTime(251); QCOMPARE(group.currentTime(), 251); QCOMPARE(a1_p_o1->currentTime(), 250); QCOMPARE(a1_p_o2->currentTime(), 1); - QCOMPARE(a1_p_o2->currentIteration(), 1); + QCOMPARE(a1_p_o2->currentLoop(), 1); QCOMPARE(a1_p_o3->currentTime(), 250); QCOMPARE(notTimeDriven->currentTime(), 251); QCOMPARE(loopsForever->currentTime(), 1); @@ -589,7 +589,7 @@ void tst_QParallelAnimationGroup::zeroDurationAnimation() group.stop(); - group.setIterationCount(4); + group.setLoopCount(4); stateChangedSpy1.clear(); stateChangedSpy2.clear(); @@ -625,7 +625,7 @@ void tst_QParallelAnimationGroup::stopUncontrolledAnimations() loopsForever.setStartValue(0); loopsForever.setEndValue(100); loopsForever.setDuration(100); - loopsForever.setIterationCount(-1); + loopsForever.setLoopCount(-1); QSignalSpy stateChangedSpy(&anim1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); @@ -670,10 +670,10 @@ struct AnimState { #define Stopped QAbstractAnimation::Stopped Q_DECLARE_METATYPE(AnimState) -void tst_QParallelAnimationGroup::iterationCount_data() +void tst_QParallelAnimationGroup::loopCount_data() { QTest::addColumn<bool>("directionBackward"); - QTest::addColumn<int>("setIterationCount"); + QTest::addColumn<int>("setLoopCount"); QTest::addColumn<int>("initialGroupTime"); QTest::addColumn<int>("currentGroupTime"); QTest::addColumn<AnimState>("expected1"); @@ -742,10 +742,10 @@ void tst_QParallelAnimationGroup::iterationCount_data() } -void tst_QParallelAnimationGroup::iterationCount() +void tst_QParallelAnimationGroup::loopCount() { QFETCH(bool, directionBackward); - QFETCH(int, setIterationCount); + QFETCH(int, setLoopCount); QFETCH(int, initialGroupTime); QFETCH(int, currentGroupTime); QFETCH(AnimState, expected1); @@ -763,7 +763,7 @@ void tst_QParallelAnimationGroup::iterationCount() anim2.setStartValue(0); anim2.setEndValue(100); anim2.setDuration(60); //total 120 - anim2.setIterationCount(2); + anim2.setLoopCount(2); TestAnimation anim3; anim3.setStartValue(0); @@ -774,7 +774,7 @@ void tst_QParallelAnimationGroup::iterationCount() group.addAnimation(&anim2); group.addAnimation(&anim3); - group.setIterationCount(setIterationCount); + group.setLoopCount(setLoopCount); if (initialGroupTime >= 0) group.setCurrentTime(initialGroupTime); if (directionBackward) diff --git a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp index f61df49..2ab0605 100644 --- a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp +++ b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp @@ -144,7 +144,7 @@ void tst_QPropertyAnimation::construction() void tst_QPropertyAnimation::setCurrentTime_data() { QTest::addColumn<int>("duration"); - QTest::addColumn<int>("iterationCount"); + QTest::addColumn<int>("loopCount"); QTest::addColumn<int>("currentTime"); QTest::addColumn<int>("testCurrentTime"); QTest::addColumn<int>("testCurrentLoop"); @@ -177,7 +177,7 @@ void tst_QPropertyAnimation::setCurrentTime_data() void tst_QPropertyAnimation::setCurrentTime() { QFETCH(int, duration); - QFETCH(int, iterationCount); + QFETCH(int, loopCount); QFETCH(int, currentTime); QFETCH(int, testCurrentTime); QFETCH(int, testCurrentLoop); @@ -186,11 +186,11 @@ void tst_QPropertyAnimation::setCurrentTime() if (duration < 0) QTest::ignoreMessage(QtWarningMsg, "QVariantAnimation::setDuration: cannot set a negative duration"); animation.setDuration(duration); - animation.setIterationCount(iterationCount); + animation.setLoopCount(loopCount); animation.setCurrentTime(currentTime); QCOMPARE(animation.currentTime(), testCurrentTime); - QCOMPARE(animation.currentIteration(), testCurrentLoop); + QCOMPARE(animation.currentLoop(), testCurrentLoop); } void tst_QPropertyAnimation::statesAndSignals_data() @@ -208,7 +208,7 @@ void tst_QPropertyAnimation::statesAndSignals() QSignalSpy finishedSpy(anim, SIGNAL(finished())); QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); - QSignalSpy currentLoopSpy(anim, SIGNAL(currentIterationChanged(int))); + QSignalSpy currentLoopSpy(anim, SIGNAL(currentLoopChanged(int))); anim->setCurrentTime(1); anim->setCurrentTime(100); @@ -217,23 +217,23 @@ void tst_QPropertyAnimation::statesAndSignals() QCOMPARE(currentLoopSpy.count(), 0); QCOMPARE(anim->state(), QAnimationGroup::Stopped); - anim->setIterationCount(3); + anim->setLoopCount(3); anim->setCurrentTime(101); if (uncontrolled) QSKIP("Uncontrolled animations don't handle looping", SkipSingle); QCOMPARE(currentLoopSpy.count(), 1); - QCOMPARE(anim->currentIteration(), 1); + QCOMPARE(anim->currentLoop(), 1); anim->setCurrentTime(0); QCOMPARE(currentLoopSpy.count(), 2); - QCOMPARE(anim->currentIteration(), 0); + QCOMPARE(anim->currentLoop(), 0); anim->start(); QCOMPARE(anim->state(), QAnimationGroup::Running); QCOMPARE(runningSpy.count(), 1); //anim must have started - QCOMPARE(anim->currentIteration(), 0); + QCOMPARE(anim->currentLoop(), 0); runningSpy.clear(); anim->stop(); @@ -241,7 +241,7 @@ void tst_QPropertyAnimation::statesAndSignals() QCOMPARE(runningSpy.count(), 1); //anim must have stopped QCOMPARE(finishedSpy.count(), 0); QCOMPARE(anim->currentTime(), 0); - QCOMPARE(anim->currentIteration(), 0); + QCOMPARE(anim->currentLoop(), 0); QCOMPARE(currentLoopSpy.count(), 2); runningSpy.clear(); @@ -252,24 +252,24 @@ void tst_QPropertyAnimation::statesAndSignals() runningSpy.clear(); QCOMPARE(finishedSpy.count(), 1); QCOMPARE(anim->currentTime(), 100); - QCOMPARE(anim->currentIteration(), 2); + QCOMPARE(anim->currentLoop(), 2); QCOMPARE(currentLoopSpy.count(), 4); anim->start(); // auto-rewinds QCOMPARE(anim->state(), QAnimationGroup::Running); QCOMPARE(anim->currentTime(), 0); - QCOMPARE(anim->currentIteration(), 0); + QCOMPARE(anim->currentLoop(), 0); QCOMPARE(currentLoopSpy.count(), 5); QCOMPARE(runningSpy.count(), 1); // anim has started QCOMPARE(finishedSpy.count(), 1); - QCOMPARE(anim->currentIteration(), 0); + QCOMPARE(anim->currentLoop(), 0); runningSpy.clear(); QTest::qWait(1000); QCOMPARE(currentLoopSpy.count(), 7); QCOMPARE(anim->state(), QAnimationGroup::Stopped); - QCOMPARE(anim->currentIteration(), 2); + QCOMPARE(anim->currentLoop(), 2); QCOMPARE(runningSpy.count(), 1); // anim has stopped QCOMPARE(finishedSpy.count(), 2); QCOMPARE(anim->currentTime(), 100); @@ -340,7 +340,7 @@ void tst_QPropertyAnimation::deletion2() QCOMPARE(runningSpy.count(), 1); QCOMPARE(finishedSpy.count(), 0); - //we can't call deletaLater directly because the delete would only happen in the next iteration of _this_ event loop + //we can't call deletaLater directly because the delete would only happen in the next loop of _this_ event loop QTimer::singleShot(0, object, SLOT(deleteLater())); QTest::qWait(50); diff --git a/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp b/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp index 18b57b2..0631343 100644 --- a/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp +++ b/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp @@ -173,7 +173,7 @@ void tst_QSequentialAnimationGroup::setCurrentTime() QVariantAnimation *a1_s_o1 = new QPropertyAnimation(&s_o1, "value"); QVariantAnimation *a2_s_o1 = new QPropertyAnimation(&s_o1, "value"); QVariantAnimation *a3_s_o1 = new QPropertyAnimation(&s_o1, "value"); - a2_s_o1->setIterationCount(3); + a2_s_o1->setLoopCount(3); sequence->addAnimation(a1_s_o1); sequence->addAnimation(a2_s_o1); sequence->addAnimation(a3_s_o1); @@ -221,7 +221,7 @@ void tst_QSequentialAnimationGroup::setCurrentTime() QCOMPARE(sequence->currentTime(), 251); QCOMPARE(a1_s_o1->currentTime(), 250); QCOMPARE(a2_s_o1->currentTime(), 1); - QCOMPARE(a2_s_o1->currentIteration(), 0); + QCOMPARE(a2_s_o1->currentLoop(), 0); QCOMPARE(a3_s_o1->currentTime(), 0); QCOMPARE(sequence2->currentTime(), 0); QCOMPARE(a1_s_o2->currentTime(), 0); @@ -233,7 +233,7 @@ void tst_QSequentialAnimationGroup::setCurrentTime() QCOMPARE(sequence->currentTime(), 750); QCOMPARE(a1_s_o1->currentTime(), 250); QCOMPARE(a2_s_o1->currentTime(), 0); - QCOMPARE(a2_s_o1->currentIteration(), 2); + QCOMPARE(a2_s_o1->currentLoop(), 2); QCOMPARE(a3_s_o1->currentTime(), 0); QCOMPARE(sequence2->currentTime(), 0); QCOMPARE(a1_s_o2->currentTime(), 0); @@ -245,7 +245,7 @@ void tst_QSequentialAnimationGroup::setCurrentTime() QCOMPARE(sequence->currentTime(), 1000); QCOMPARE(a1_s_o1->currentTime(), 250); QCOMPARE(a2_s_o1->currentTime(), 250); - QCOMPARE(a2_s_o1->currentIteration(), 2); + QCOMPARE(a2_s_o1->currentLoop(), 2); QCOMPARE(a3_s_o1->currentTime(), 0); QCOMPARE(sequence2->currentTime(), 0); QCOMPARE(a1_s_o2->currentTime(), 0); @@ -257,7 +257,7 @@ void tst_QSequentialAnimationGroup::setCurrentTime() QCOMPARE(sequence->currentTime(), 1010); QCOMPARE(a1_s_o1->currentTime(), 250); QCOMPARE(a2_s_o1->currentTime(), 250); - QCOMPARE(a2_s_o1->currentIteration(), 2); + QCOMPARE(a2_s_o1->currentLoop(), 2); QCOMPARE(a3_s_o1->currentTime(), 10); QCOMPARE(sequence2->currentTime(), 0); QCOMPARE(a1_s_o2->currentTime(), 0); @@ -269,7 +269,7 @@ void tst_QSequentialAnimationGroup::setCurrentTime() QCOMPARE(sequence->currentTime(), 1250); QCOMPARE(a1_s_o1->currentTime(), 250); QCOMPARE(a2_s_o1->currentTime(), 250); - QCOMPARE(a2_s_o1->currentIteration(), 2); + QCOMPARE(a2_s_o1->currentLoop(), 2); QCOMPARE(a3_s_o1->currentTime(), 250); QCOMPARE(sequence2->currentTime(), 0); QCOMPARE(a1_s_o2->currentTime(), 0); @@ -281,7 +281,7 @@ void tst_QSequentialAnimationGroup::setCurrentTime() QCOMPARE(sequence->currentTime(), 1250); QCOMPARE(a1_s_o1->currentTime(), 250); QCOMPARE(a2_s_o1->currentTime(), 250); - QCOMPARE(a2_s_o1->currentIteration(), 2); + QCOMPARE(a2_s_o1->currentLoop(), 2); QCOMPARE(a3_s_o1->currentTime(), 250); QCOMPARE(sequence2->currentTime(), 250); QCOMPARE(a1_s_o2->currentTime(), 250); @@ -293,7 +293,7 @@ void tst_QSequentialAnimationGroup::setCurrentTime() QCOMPARE(sequence->currentTime(), 1250); QCOMPARE(a1_s_o1->currentTime(), 250); QCOMPARE(a2_s_o1->currentTime(), 250); - QCOMPARE(a2_s_o1->currentIteration(), 2); + QCOMPARE(a2_s_o1->currentLoop(), 2); QCOMPARE(a3_s_o1->currentTime(), 250); QCOMPARE(sequence2->currentTime(), 500); QCOMPARE(a1_s_o2->currentTime(), 250); @@ -305,7 +305,7 @@ void tst_QSequentialAnimationGroup::setCurrentTime() QCOMPARE(sequence->currentTime(), 1250); QCOMPARE(a1_s_o1->currentTime(), 250); QCOMPARE(a2_s_o1->currentTime(), 250); - QCOMPARE(a2_s_o1->currentIteration(), 2); + QCOMPARE(a2_s_o1->currentLoop(), 2); QCOMPARE(a3_s_o1->currentTime(), 250); QCOMPARE(sequence2->currentTime(), 500); QCOMPARE(a1_s_o2->currentTime(), 250); @@ -330,7 +330,7 @@ void tst_QSequentialAnimationGroup::setCurrentTimeWithUncontrolledAnimation() QCOMPARE(notTimeDriven->totalDuration(), -1); QVariantAnimation *loopsForever = new QPropertyAnimation(&t_o2, "value"); - loopsForever->setIterationCount(-1); + loopsForever->setLoopCount(-1); QCOMPARE(loopsForever->totalDuration(), -1); QSequentialAnimationGroup group; @@ -436,7 +436,7 @@ void tst_QSequentialAnimationGroup::seekingForwards() QVariantAnimation *a1_s_o1 = new QPropertyAnimation(&s_o1, "value"); QVariantAnimation *a2_s_o1 = new QPropertyAnimation(&s_o1, "value"); QVariantAnimation *a3_s_o1 = new QPropertyAnimation(&s_o1, "value"); - a2_s_o1->setIterationCount(3); + a2_s_o1->setLoopCount(3); sequence->addAnimation(a1_s_o1); sequence->addAnimation(a2_s_o1); sequence->addAnimation(a3_s_o1); @@ -476,7 +476,7 @@ void tst_QSequentialAnimationGroup::seekingForwards() QCOMPARE(sequence->currentTime(), 1250); QCOMPARE(a1_s_o1->currentTime(), 250); QCOMPARE(a2_s_o1->currentTime(), 250); - QCOMPARE(a2_s_o1->currentIteration(), 2); + QCOMPARE(a2_s_o1->currentLoop(), 2); QCOMPARE(a3_s_o1->currentTime(), 250); QCOMPARE(sequence2->currentTime(), 250); QCOMPARE(a1_s_o2->currentTime(), 250); @@ -498,7 +498,7 @@ void tst_QSequentialAnimationGroup::seekingForwards() QCOMPARE(sequence->currentTime(), 1250); QCOMPARE(a1_s_o1->currentTime(), 250); QCOMPARE(a2_s_o1->currentTime(), 250); - QCOMPARE(a2_s_o1->currentIteration(), 2); + QCOMPARE(a2_s_o1->currentLoop(), 2); QCOMPARE(a3_s_o1->currentTime(), 250); QCOMPARE(sequence2->currentTime(), 500); QCOMPARE(a1_s_o2->currentTime(), 250); @@ -516,7 +516,7 @@ void tst_QSequentialAnimationGroup::seekingBackwards() QVariantAnimation *a1_s_o1 = new QPropertyAnimation(&s_o1, "value"); QVariantAnimation *a2_s_o1 = new QPropertyAnimation(&s_o1, "value"); QVariantAnimation *a3_s_o1 = new QPropertyAnimation(&s_o1, "value"); - a2_s_o1->setIterationCount(3); + a2_s_o1->setLoopCount(3); sequence->addAnimation(a1_s_o1); sequence->addAnimation(a2_s_o1); sequence->addAnimation(a3_s_o1); @@ -540,7 +540,7 @@ void tst_QSequentialAnimationGroup::seekingBackwards() QCOMPARE(sequence->currentTime(), 1250); QCOMPARE(a1_s_o1->currentTime(), 250); QCOMPARE(a2_s_o1->currentTime(), 250); - QCOMPARE(a2_s_o1->currentIteration(), 2); + QCOMPARE(a2_s_o1->currentLoop(), 2); QCOMPARE(a3_s_o1->currentTime(), 250); QCOMPARE(sequence2->currentTime(), 350); QCOMPARE(a1_s_o2->currentTime(), 250); @@ -564,7 +564,7 @@ void tst_QSequentialAnimationGroup::seekingBackwards() QCOMPARE(a2_s_o1->currentTime(), 0); QEXPECT_FAIL("", "rewinding in nested groups is considered as a restart from the children," "hence they don't reset from their current animation", Continue); - QCOMPARE(a2_s_o1->currentIteration(), 0); + QCOMPARE(a2_s_o1->currentLoop(), 0); QEXPECT_FAIL("", "rewinding in nested groups is considered as a restart from the children," "hence they don't reset from their current animation", Continue); QCOMPARE(a3_s_o1->currentTime(), 0); @@ -585,7 +585,7 @@ void tst_QSequentialAnimationGroup::seekingBackwards() QCOMPARE(sequence->currentTime(), 1250); QCOMPARE(a1_s_o1->currentTime(), 250); QCOMPARE(a2_s_o1->currentTime(), 250); - QCOMPARE(a2_s_o1->currentIteration(), 2); + QCOMPARE(a2_s_o1->currentLoop(), 2); QCOMPARE(a3_s_o1->currentTime(), 250); QCOMPARE(sequence2->currentTime(), 500); QCOMPARE(a1_s_o2->currentTime(), 250); @@ -656,11 +656,11 @@ void tst_QSequentialAnimationGroup::pauseAndResume() QVariantAnimation *a1_s_o1 = new QPropertyAnimation(&s_o1, "value"); QVariantAnimation *a2_s_o1 = new QPropertyAnimation(&s_o1, "value"); QVariantAnimation *a3_s_o1 = new QPropertyAnimation(&s_o1, "value"); - a2_s_o1->setIterationCount(2); + a2_s_o1->setLoopCount(2); sequence->addAnimation(a1_s_o1); sequence->addAnimation(a2_s_o1); sequence->addAnimation(a3_s_o1); - sequence->setIterationCount(2); + sequence->setLoopCount(2); QSignalSpy a1StateChangedSpy(a1_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); QSignalSpy seqStateChangedSpy(sequence, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); @@ -675,11 +675,11 @@ void tst_QSequentialAnimationGroup::pauseAndResume() group.setCurrentTime(1751); QCOMPARE(group.currentTime(), 1751); QCOMPARE(sequence->currentTime(), 751); - QCOMPARE(sequence->currentIteration(), 1); + QCOMPARE(sequence->currentLoop(), 1); QCOMPARE(a1_s_o1->currentTime(), 250); QCOMPARE(a2_s_o1->currentTime(), 250); - QCOMPARE(a2_s_o1->currentIteration(), 1); - QCOMPARE(a3_s_o1->currentIteration(), 0); + QCOMPARE(a2_s_o1->currentLoop(), 1); + QCOMPARE(a3_s_o1->currentLoop(), 0); QCOMPARE(a3_s_o1->currentTime(), 1); QCOMPARE(group.state(), QAnimationGroup::Paused); @@ -723,11 +723,11 @@ void tst_QSequentialAnimationGroup::pauseAndResume() QVERIFY(group.currentTime() >= 1751); QVERIFY(sequence->currentTime() >= 751); - QCOMPARE(sequence->currentIteration(), 1); + QCOMPARE(sequence->currentLoop(), 1); QCOMPARE(a1_s_o1->currentTime(), 250); QCOMPARE(a2_s_o1->currentTime(), 250); - QCOMPARE(a2_s_o1->currentIteration(), 1); - QCOMPARE(a3_s_o1->currentIteration(), 0); + QCOMPARE(a2_s_o1->currentLoop(), 1); + QCOMPARE(a3_s_o1->currentLoop(), 0); QVERIFY(a3_s_o1->currentTime() >= 1); QCOMPARE(seqStateChangedSpy.count(), 3); // Running,Paused,Running @@ -744,11 +744,11 @@ void tst_QSequentialAnimationGroup::pauseAndResume() QVERIFY(group.currentTime() >= 1751); QVERIFY(sequence->currentTime() >= 751); - QCOMPARE(sequence->currentIteration(), 1); + QCOMPARE(sequence->currentLoop(), 1); QCOMPARE(a1_s_o1->currentTime(), 250); QCOMPARE(a2_s_o1->currentTime(), 250); - QCOMPARE(a2_s_o1->currentIteration(), 1); - QCOMPARE(a3_s_o1->currentIteration(), 0); + QCOMPARE(a2_s_o1->currentLoop(), 1); + QCOMPARE(a3_s_o1->currentLoop(), 0); QVERIFY(a3_s_o1->currentTime() >= 1); QCOMPARE(seqStateChangedSpy.count(), 4); // Running,Paused,Running,Paused @@ -780,11 +780,11 @@ void tst_QSequentialAnimationGroup::restart() animsStateChanged[i] = new QSignalSpy(anims[i], SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); } - anims[1]->setIterationCount(2); + anims[1]->setLoopCount(2); sequence->addAnimation(anims[0]); sequence->addAnimation(anims[1]); sequence->addAnimation(anims[2]); - sequence->setIterationCount(2); + sequence->setLoopCount(2); QSequentialAnimationGroup group; group.addAnimation(sequence); @@ -845,17 +845,17 @@ void tst_QSequentialAnimationGroup::looping() QSignalSpy a3Spy(a3_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); QSignalSpy seqSpy(sequence, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); - a2_s_o1->setIterationCount(2); + a2_s_o1->setLoopCount(2); sequence->addAnimation(a1_s_o1); sequence->addAnimation(a2_s_o1); sequence->addAnimation(a3_s_o1); - sequence->setIterationCount(2); + sequence->setLoopCount(2); QSequentialAnimationGroup group; QSignalSpy groupSpy(&group, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); group.addAnimation(sequence); - group.setIterationCount(2); + group.setLoopCount(2); group.start(); group.pause(); @@ -864,12 +864,12 @@ void tst_QSequentialAnimationGroup::looping() group.setCurrentTime(1750); QCOMPARE(group.currentTime(), 1750); QCOMPARE(sequence->currentTime(), 750); - QCOMPARE(sequence->currentIteration(), 1); + QCOMPARE(sequence->currentLoop(), 1); QCOMPARE(a1_s_o1->currentTime(), 250); QCOMPARE(a2_s_o1->currentTime(), 250); - QCOMPARE(a2_s_o1->currentIteration(), 1); + QCOMPARE(a2_s_o1->currentLoop(), 1); // this animation is at the beginning because it is the current one inside sequence - QCOMPARE(a3_s_o1->currentIteration(), 0); + QCOMPARE(a3_s_o1->currentLoop(), 0); QCOMPARE(a3_s_o1->currentTime(), 0); QCOMPARE(sequence->currentAnimation(), a3_s_o1); @@ -898,14 +898,14 @@ void tst_QSequentialAnimationGroup::looping() // Looping, current time = duration + 1 group.setCurrentTime(group.duration() + 1); QCOMPARE(group.currentTime(), 1); - QCOMPARE(group.currentIteration(), 1); + QCOMPARE(group.currentLoop(), 1); QCOMPARE(sequence->currentTime(), 1); - QCOMPARE(sequence->currentIteration(), 0); + QCOMPARE(sequence->currentLoop(), 0); QCOMPARE(a1_s_o1->currentTime(), 1); QCOMPARE(a2_s_o1->currentTime(), 250); - QCOMPARE(a2_s_o1->currentIteration(), 1); + QCOMPARE(a2_s_o1->currentLoop(), 1); // this animation is at the end because it was run on the previous loop - QCOMPARE(a3_s_o1->currentIteration(), 0); + QCOMPARE(a3_s_o1->currentLoop(), 0); QCOMPARE(a3_s_o1->currentTime(), 250); QCOMPARE(group.state(), QAnimationGroup::Paused); @@ -1367,7 +1367,7 @@ void tst_QSequentialAnimationGroup::zeroDurationAnimation() group.addAnimation(anim1); group.addAnimation(anim2); group.addAnimation(anim3); - group.setIterationCount(2); + group.setLoopCount(2); group.start(); QCOMPARE(stateChangedSpy.count(), 2); @@ -1401,7 +1401,7 @@ void tst_QSequentialAnimationGroup::stopUncontrolledAnimations() loopsForever.setStartValue(0); loopsForever.setEndValue(100); loopsForever.setDuration(100); - loopsForever.setIterationCount(-1); + loopsForever.setLoopCount(-1); group.addAnimation(¬TimeDriven); group.addAnimation(&loopsForever); @@ -1592,11 +1592,11 @@ void tst_QSequentialAnimationGroup::currentAnimationWithZeroDuration() void tst_QSequentialAnimationGroup::insertAnimation() { QSequentialAnimationGroup group; - group.setIterationCount(2); + group.setLoopCount(2); QPropertyAnimation *anim = new QPropertyAnimation(&group); QCOMPARE(group.duration(), anim->duration()); group.setCurrentTime(300); - QCOMPARE(group.currentIteration(), 1); + QCOMPARE(group.currentLoop(), 1); //this will crash if the sequential group calls duration on the created animation new QPropertyAnimation(&group); |