From a438267c84ccc4ef1b0d2210cb596757607759e6 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 16 Oct 2012 10:59:53 +0200 Subject: normalise signal/slot signatures [QtCore tests] Normalise all signal/slot signatures in tests/*/corelib, except in tst_QObject, where they might be test data. Change-Id: Id4e101f285b1676bb583b0afae06d235e599e24b Reviewed-by: Stephen Kelly Reviewed-by: Olivier Goffart Reviewed-by: Marc Mutz --- .../qanimationgroup/tst_qanimationgroup.cpp | 2 +- .../tst_qparallelanimationgroup.cpp | 26 +++++++++--------- .../qpropertyanimation/tst_qpropertyanimation.cpp | 18 ++++++------ .../tst_qsequentialanimationgroup.cpp | 32 +++++++++++----------- 4 files changed, 39 insertions(+), 39 deletions(-) (limited to 'tests/auto/corelib/animation') diff --git a/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp b/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp index c3e368a813..33f9f0df48 100644 --- a/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp +++ b/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp @@ -137,7 +137,7 @@ private: void tst_QAnimationGroup::emptyGroup() { QSequentialAnimationGroup group; - QSignalSpy groupStateChangedSpy(&group, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy groupStateChangedSpy(&group, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(groupStateChangedSpy.isValid()); QCOMPARE(group.state(), QAnimationGroup::Stopped); diff --git a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp index 7cb7bd024c..954a2ee983 100644 --- a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp +++ b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp @@ -256,10 +256,10 @@ void tst_QParallelAnimationGroup::stateChanged() group.addAnimation(anim3); group.addAnimation(anim4); - QSignalSpy spy1(anim1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); - QSignalSpy spy2(anim2, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); - QSignalSpy spy3(anim3, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); - QSignalSpy spy4(anim4, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy spy1(anim1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); + QSignalSpy spy2(anim2, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); + QSignalSpy spy3(anim3, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); + QSignalSpy spy4(anim4, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(spy1.isValid()); QVERIFY(spy2.isValid()); @@ -434,8 +434,8 @@ void tst_QParallelAnimationGroup::updateChildrenWithRunningGroup() anim.setEndValue(100); anim.setDuration(200); - QSignalSpy groupStateChangedSpy(&group, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); - QSignalSpy childStateChangedSpy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy groupStateChangedSpy(&group, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); + QSignalSpy childStateChangedSpy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(groupStateChangedSpy.isValid()); QVERIFY(childStateChangedSpy.isValid()); @@ -601,8 +601,8 @@ void tst_QParallelAnimationGroup::startGroupWithRunningChild() anim2.setEndValue(100); anim2.setDuration(200); - QSignalSpy stateChangedSpy1(&anim1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); - QSignalSpy stateChangedSpy2(&anim2, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy stateChangedSpy1(&anim1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); + QSignalSpy stateChangedSpy2(&anim2, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(stateChangedSpy1.isValid()); QVERIFY(stateChangedSpy2.isValid()); @@ -669,19 +669,19 @@ void tst_QParallelAnimationGroup::zeroDurationAnimation() anim3.setEndValue(100); anim3.setDuration(10); - QSignalSpy stateChangedSpy1(&anim1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy stateChangedSpy1(&anim1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QSignalSpy finishedSpy1(&anim1, SIGNAL(finished())); QVERIFY(stateChangedSpy1.isValid()); QVERIFY(finishedSpy1.isValid()); - QSignalSpy stateChangedSpy2(&anim2, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy stateChangedSpy2(&anim2, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QSignalSpy finishedSpy2(&anim2, SIGNAL(finished())); QVERIFY(stateChangedSpy2.isValid()); QVERIFY(finishedSpy2.isValid()); - QSignalSpy stateChangedSpy3(&anim3, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy stateChangedSpy3(&anim3, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QSignalSpy finishedSpy3(&anim3, SIGNAL(finished())); QVERIFY(stateChangedSpy3.isValid()); @@ -760,7 +760,7 @@ void tst_QParallelAnimationGroup::stopUncontrolledAnimations() loopsForever.setDuration(100); loopsForever.setLoopCount(-1); - QSignalSpy stateChangedSpy(&anim1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy stateChangedSpy(&anim1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(stateChangedSpy.isValid()); group.addAnimation(&anim1); @@ -968,7 +968,7 @@ void tst_QParallelAnimationGroup::pauseResume() { QParallelAnimationGroup group; TestAnimation2 *anim = new TestAnimation2(250, &group); // 0, duration = 250; - QSignalSpy spy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy spy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(spy.isValid()); QCOMPARE(group.duration(), 250); group.start(); diff --git a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp index 8b7bd74130..bc08be530c 100644 --- a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp +++ b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp @@ -228,7 +228,7 @@ void tst_QPropertyAnimation::statesAndSignals() anim->setDuration(100); QSignalSpy finishedSpy(anim, SIGNAL(finished())); - QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QSignalSpy currentLoopSpy(anim, SIGNAL(currentLoopChanged(int))); QVERIFY(finishedSpy.isValid()); @@ -308,7 +308,7 @@ void tst_QPropertyAnimation::deletion1() QPointer anim = new QPropertyAnimation(object, "minimumWidth"); //test that the animation is deleted correctly depending of the deletion flag passed in start() - QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QSignalSpy finishedSpy(anim, SIGNAL(finished())); QVERIFY(runningSpy.isValid()); QVERIFY(finishedSpy.isValid()); @@ -352,7 +352,7 @@ void tst_QPropertyAnimation::deletion2() anim->setEndValue(20); anim->setDuration(200); - QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QSignalSpy finishedSpy(anim, SIGNAL(finished())); QVERIFY(runningSpy.isValid()); @@ -386,7 +386,7 @@ void tst_QPropertyAnimation::deletion3() anim->setEndValue(20); anim->setDuration(200); - QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QSignalSpy finishedSpy(anim, SIGNAL(finished())); QVERIFY(runningSpy.isValid()); @@ -487,7 +487,7 @@ void tst_QPropertyAnimation::startWhenAnotherIsRunning() //normal case: the animation finishes and is deleted QPointer anim = new QPropertyAnimation(&o, "ole"); anim->setEndValue(100); - QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(runningSpy.isValid()); anim->start(QVariantAnimation::DeleteWhenStopped); QTest::qWait(anim->duration() + 100); @@ -498,7 +498,7 @@ void tst_QPropertyAnimation::startWhenAnotherIsRunning() { QPointer anim = new QPropertyAnimation(&o, "ole"); anim->setEndValue(100); - QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(runningSpy.isValid()); anim->start(QVariantAnimation::DeleteWhenStopped); QTest::qWait(anim->duration()/2); @@ -849,7 +849,7 @@ void tst_QPropertyAnimation::setStartEndValues() void tst_QPropertyAnimation::zeroDurationStart() { DummyPropertyAnimation anim; - QSignalSpy spy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy spy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(spy.isValid()); anim.setDuration(0); QCOMPARE(anim.state(), QAbstractAnimation::Stopped); @@ -927,7 +927,7 @@ void tst_QPropertyAnimation::operationsInStates() o.setProperty("ole", 42); QPropertyAnimation anim(&o, "ole"); anim.setEndValue(100); - QSignalSpy spy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy spy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(spy.isValid()); anim.stop(); @@ -1219,7 +1219,7 @@ void tst_QPropertyAnimation::zeroLoopCount() anim->setDuration(20); anim->setLoopCount(0); - QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QSignalSpy finishedSpy(anim, SIGNAL(finished())); QVERIFY(runningSpy.isValid()); diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp index 64751fd8d0..970d6a995b 100644 --- a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp +++ b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp @@ -639,8 +639,8 @@ void tst_QSequentialAnimationGroup::pauseAndResume() sequence->addAnimation(a3_s_o1); sequence->setLoopCount(2); - QSignalSpy a1StateChangedSpy(a1_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); - QSignalSpy seqStateChangedSpy(sequence, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy a1StateChangedSpy(a1_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); + QSignalSpy seqStateChangedSpy(sequence, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(a1StateChangedSpy.isValid()); QVERIFY(seqStateChangedSpy.isValid()); @@ -747,7 +747,7 @@ void tst_QSequentialAnimationGroup::restart() // sequence operating on same object/property QAnimationGroup *sequence = new QSequentialAnimationGroup(); QSignalSpy seqCurrentAnimChangedSpy(sequence, SIGNAL(currentAnimationChanged(QAbstractAnimation*))); - QSignalSpy seqStateChangedSpy(sequence, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy seqStateChangedSpy(sequence, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(seqCurrentAnimChangedSpy.isValid()); QVERIFY(seqStateChangedSpy.isValid()); @@ -758,7 +758,7 @@ void tst_QSequentialAnimationGroup::restart() for (int i = 0; i < 3; i++) { anims[i] = new DummyPropertyAnimation; anims[i]->setDuration(100); - animsStateChanged[i] = new QSignalSpy(anims[i], SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + animsStateChanged[i] = new QSignalSpy(anims[i], SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(animsStateChanged[i]->isValid()); } @@ -818,10 +818,10 @@ void tst_QSequentialAnimationGroup::looping() QAbstractAnimation *a2_s_o1 = new DummyPropertyAnimation; QAbstractAnimation *a3_s_o1 = new DummyPropertyAnimation; - QSignalSpy a1Spy(a1_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); - QSignalSpy a2Spy(a2_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); - QSignalSpy a3Spy(a3_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); - QSignalSpy seqSpy(sequence, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy a1Spy(a1_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); + QSignalSpy a2Spy(a2_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); + QSignalSpy a3Spy(a3_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); + QSignalSpy seqSpy(sequence, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(a1Spy.isValid()); QVERIFY(a2Spy.isValid()); @@ -835,7 +835,7 @@ void tst_QSequentialAnimationGroup::looping() sequence->setLoopCount(2); QSequentialAnimationGroup group; - QSignalSpy groupSpy(&group, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy groupSpy(&group, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(groupSpy.isValid()); group.addAnimation(sequence); @@ -1103,8 +1103,8 @@ void tst_QSequentialAnimationGroup::updateChildrenWithRunningGroup() anim.setEndValue(100); anim.setDuration(200); - QSignalSpy groupStateChangedSpy(&group, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); - QSignalSpy childStateChangedSpy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy groupStateChangedSpy(&group, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); + QSignalSpy childStateChangedSpy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(groupStateChangedSpy.isValid()); QVERIFY(childStateChangedSpy.isValid()); @@ -1270,8 +1270,8 @@ void tst_QSequentialAnimationGroup::startGroupWithRunningChild() anim2->setEndValue(100); anim2->setDuration(200); - QSignalSpy stateChangedSpy1(anim1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); - QSignalSpy stateChangedSpy2(anim2, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy stateChangedSpy1(anim1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); + QSignalSpy stateChangedSpy2(anim2, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(stateChangedSpy1.isValid()); QVERIFY(stateChangedSpy2.isValid()); @@ -1347,7 +1347,7 @@ void tst_QSequentialAnimationGroup::zeroDurationAnimation() anim3->setEndValue(100); anim3->setDuration(0); - QSignalSpy stateChangedSpy(anim1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy stateChangedSpy(anim1, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(stateChangedSpy.isValid()); group.addAnimation(anim1); @@ -1439,7 +1439,7 @@ void tst_QSequentialAnimationGroup::finishWithUncontrolledAnimation() // lets make sure the seeking will work again spy.clear(); DummyPropertyAnimation anim(&group); - QSignalSpy animStateChangedSpy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy animStateChangedSpy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(animStateChangedSpy.isValid()); group.setCurrentTime(300); @@ -1641,7 +1641,7 @@ void tst_QSequentialAnimationGroup::pauseResume() QPropertyAnimation *anim = new QPropertyAnimation(&dummy, "foo", &group); anim->setDuration(250); anim->setEndValue(250); - QSignalSpy spy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); + QSignalSpy spy(anim, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State))); QVERIFY(spy.isValid()); QCOMPARE(group.duration(), 250); group.start(); -- cgit v1.2.3