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 ++++----- .../qfilesystemwatcher/tst_qfilesystemwatcher.cpp | 8 +-- tests/auto/corelib/io/qprocess/tst_qprocess.cpp | 18 ++--- .../qabstractitemmodel/tst_qabstractitemmodel.cpp | 52 +++++++------- .../itemmodels/qitemmodel/tst_qitemmodel.cpp | 84 +++++++++++----------- .../tst_qitemselectionmodel.cpp | 6 +- .../tst_qsortfilterproxymodel.cpp | 34 ++++----- .../qstringlistmodel/tst_qstringlistmodel.cpp | 16 ++--- .../corelib/kernel/qobject/signalbug/signalbug.cpp | 8 +-- tests/auto/corelib/kernel/qobject/tst_qobject.cpp | 66 ++++++++--------- .../kernel/qsignalmapper/tst_qsignalmapper.cpp | 2 +- .../qstatemachine/tst_qstatemachine.cpp | 14 ++-- .../thread/qfuturewatcher/tst_qfuturewatcher.cpp | 8 +-- tests/auto/other/modeltest/modeltest.cpp | 80 ++++++++++----------- tests/benchmarks/corelib/kernel/qobject/main.cpp | 6 +- 18 files changed, 240 insertions(+), 240 deletions(-) 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(); diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp index a302e40574..76fa6022ba 100644 --- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp +++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp @@ -120,7 +120,7 @@ void tst_QFileSystemWatcher::basicTest() watcher.setObjectName(QLatin1String("_qt_autotest_force_engine_") + backend); QVERIFY(watcher.addPath(testFile.fileName())); - QSignalSpy changedSpy(&watcher, SIGNAL(fileChanged(const QString &))); + QSignalSpy changedSpy(&watcher, SIGNAL(fileChanged(QString))); QVERIFY(changedSpy.isValid()); QEventLoop eventLoop; QTimer timer; @@ -253,7 +253,7 @@ void tst_QFileSystemWatcher::watchDirectory() watcher.setObjectName(QLatin1String("_qt_autotest_force_engine_") + backend); QVERIFY(watcher.addPath(testDir.absolutePath())); - QSignalSpy changedSpy(&watcher, SIGNAL(directoryChanged(const QString &))); + QSignalSpy changedSpy(&watcher, SIGNAL(directoryChanged(QString))); QVERIFY(changedSpy.isValid()); QEventLoop eventLoop; QTimer timer; @@ -410,8 +410,8 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory() QVERIFY(watcher.addPath(testDir.absolutePath())); QVERIFY(watcher.addPath(testFileName)); - QSignalSpy fileChangedSpy(&watcher, SIGNAL(fileChanged(const QString &))); - QSignalSpy dirChangedSpy(&watcher, SIGNAL(directoryChanged(const QString &))); + QSignalSpy fileChangedSpy(&watcher, SIGNAL(fileChanged(QString))); + QSignalSpy dirChangedSpy(&watcher, SIGNAL(directoryChanged(QString))); QVERIFY(fileChangedSpy.isValid()); QVERIFY(dirChangedSpy.isValid()); QEventLoop eventLoop; diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp index 9ec5eb489e..22c88ca1fa 100644 --- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp +++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp @@ -312,7 +312,7 @@ void tst_QProcess::crashTest() qRegisterMetaType("QProcess::ExitStatus"); QSignalSpy spy(process, SIGNAL(error(QProcess::ProcessError))); - QSignalSpy spy2(process, SIGNAL(finished(int, QProcess::ExitStatus))); + QSignalSpy spy2(process, SIGNAL(finished(int,QProcess::ExitStatus))); QVERIFY(spy.isValid()); QVERIFY(spy2.isValid()); @@ -350,7 +350,7 @@ void tst_QProcess::crashTest2() qRegisterMetaType("QProcess::ExitStatus"); QSignalSpy spy(process, SIGNAL(error(QProcess::ProcessError))); - QSignalSpy spy2(process, SIGNAL(finished(int, QProcess::ExitStatus))); + QSignalSpy spy2(process, SIGNAL(finished(int,QProcess::ExitStatus))); QVERIFY(spy.isValid()); QVERIFY(spy2.isValid()); @@ -922,8 +922,8 @@ public: SoftExitProcess(int n) : waitedForFinished(false), n(n), killing(false) { - connect(this, SIGNAL(finished(int, QProcess::ExitStatus)), - this, SLOT(finishedSlot(int, QProcess::ExitStatus))); + connect(this, SIGNAL(finished(int,QProcess::ExitStatus)), + this, SLOT(finishedSlot(int,QProcess::ExitStatus))); switch (n) { case 0: @@ -1488,7 +1488,7 @@ void tst_QProcess::failToStart() QSignalSpy stateSpy(&process, SIGNAL(stateChanged(QProcess::ProcessState))); QSignalSpy errorSpy(&process, SIGNAL(error(QProcess::ProcessError))); QSignalSpy finishedSpy(&process, SIGNAL(finished(int))); - QSignalSpy finishedSpy2(&process, SIGNAL(finished(int, QProcess::ExitStatus))); + QSignalSpy finishedSpy2(&process, SIGNAL(finished(int,QProcess::ExitStatus))); QVERIFY(stateSpy.isValid()); QVERIFY(errorSpy.isValid()); @@ -1554,7 +1554,7 @@ void tst_QProcess::failToStartWithWait() QEventLoop loop; QSignalSpy errorSpy(&process, SIGNAL(error(QProcess::ProcessError))); QSignalSpy finishedSpy(&process, SIGNAL(finished(int))); - QSignalSpy finishedSpy2(&process, SIGNAL(finished(int, QProcess::ExitStatus))); + QSignalSpy finishedSpy2(&process, SIGNAL(finished(int,QProcess::ExitStatus))); QVERIFY(errorSpy.isValid()); QVERIFY(finishedSpy.isValid()); @@ -1581,7 +1581,7 @@ void tst_QProcess::failToStartWithEventLoop() QEventLoop loop; QSignalSpy errorSpy(&process, SIGNAL(error(QProcess::ProcessError))); QSignalSpy finishedSpy(&process, SIGNAL(finished(int))); - QSignalSpy finishedSpy2(&process, SIGNAL(finished(int, QProcess::ExitStatus))); + QSignalSpy finishedSpy2(&process, SIGNAL(finished(int,QProcess::ExitStatus))); QVERIFY(errorSpy.isValid()); QVERIFY(finishedSpy.isValid()); @@ -1819,7 +1819,7 @@ void tst_QProcess::waitForReadyReadForNonexistantProcess() QProcess process; QSignalSpy errorSpy(&process, SIGNAL(error(QProcess::ProcessError))); QSignalSpy finishedSpy1(&process, SIGNAL(finished(int))); - QSignalSpy finishedSpy2(&process, SIGNAL(finished(int, QProcess::ExitStatus))); + QSignalSpy finishedSpy2(&process, SIGNAL(finished(int,QProcess::ExitStatus))); QVERIFY(errorSpy.isValid()); QVERIFY(finishedSpy1.isValid()); @@ -2153,7 +2153,7 @@ void tst_QProcess::onlyOneStartedSignal() QProcess process; QSignalSpy spyStarted(&process, SIGNAL(started())); - QSignalSpy spyFinished(&process, SIGNAL(finished(int, QProcess::ExitStatus))); + QSignalSpy spyFinished(&process, SIGNAL(finished(int,QProcess::ExitStatus))); QVERIFY(spyStarted.isValid()); QVERIFY(spyFinished.isValid()); diff --git a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp index e0c024e39f..b987fb6835 100644 --- a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp +++ b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp @@ -810,8 +810,8 @@ void tst_QAbstractItemModel::removeRows() { QtTestModel model(10, 10); - QSignalSpy rowsAboutToBeRemovedSpy(&model, SIGNAL(rowsAboutToBeRemoved( const QModelIndex &, int , int ))); - QSignalSpy rowsRemovedSpy(&model, SIGNAL(rowsRemoved( const QModelIndex &, int, int ))); + QSignalSpy rowsAboutToBeRemovedSpy(&model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int))); + QSignalSpy rowsRemovedSpy(&model, SIGNAL(rowsRemoved(QModelIndex,int,int))); QVERIFY(rowsAboutToBeRemovedSpy.isValid()); QVERIFY(rowsRemovedSpy.isValid()); @@ -825,8 +825,8 @@ void tst_QAbstractItemModel::removeColumns() { QtTestModel model(10, 10); - QSignalSpy columnsAboutToBeRemovedSpy(&model, SIGNAL(columnsAboutToBeRemoved( const QModelIndex &, int , int ))); - QSignalSpy columnsRemovedSpy(&model, SIGNAL(columnsRemoved( const QModelIndex &, int, int ))); + QSignalSpy columnsAboutToBeRemovedSpy(&model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int))); + QSignalSpy columnsRemovedSpy(&model, SIGNAL(columnsRemoved(QModelIndex,int,int))); QVERIFY(columnsAboutToBeRemovedSpy.isValid()); QVERIFY(columnsRemovedSpy.isValid()); @@ -840,8 +840,8 @@ void tst_QAbstractItemModel::insertRows() { QtTestModel model(10, 10); - QSignalSpy rowsAboutToBeInsertedSpy(&model, SIGNAL(rowsAboutToBeInserted( const QModelIndex &, int , int ))); - QSignalSpy rowsInsertedSpy(&model, SIGNAL(rowsInserted( const QModelIndex &, int, int ))); + QSignalSpy rowsAboutToBeInsertedSpy(&model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int))); + QSignalSpy rowsInsertedSpy(&model, SIGNAL(rowsInserted(QModelIndex,int,int))); QVERIFY(rowsAboutToBeInsertedSpy.isValid()); QVERIFY(rowsInsertedSpy.isValid()); @@ -855,8 +855,8 @@ void tst_QAbstractItemModel::insertColumns() { QtTestModel model(10, 10); - QSignalSpy columnsAboutToBeInsertedSpy(&model, SIGNAL(columnsAboutToBeInserted( const QModelIndex &, int , int ))); - QSignalSpy columnsInsertedSpy(&model, SIGNAL(columnsInserted( const QModelIndex &, int, int ))); + QSignalSpy columnsAboutToBeInsertedSpy(&model, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int))); + QSignalSpy columnsInsertedSpy(&model, SIGNAL(columnsInserted(QModelIndex,int,int))); QVERIFY(columnsAboutToBeInsertedSpy.isValid()); QVERIFY(columnsInsertedSpy.isValid()); @@ -870,8 +870,8 @@ void tst_QAbstractItemModel::moveRows() { QtTestModel model(10, 10); - QSignalSpy rowsAboutToBeMovedSpy(&model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int , int, const QModelIndex &, int))); - QSignalSpy rowsMovedSpy(&model, SIGNAL(rowsMoved(const QModelIndex &, int , int, const QModelIndex &, int))); + QSignalSpy rowsAboutToBeMovedSpy(&model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); + QSignalSpy rowsMovedSpy(&model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int))); QVERIFY(rowsAboutToBeMovedSpy.isValid()); QVERIFY(rowsMovedSpy.isValid()); @@ -885,8 +885,8 @@ void tst_QAbstractItemModel::moveColumns() { QtTestModel model(10, 10); - QSignalSpy columnsAboutToBeMovedSpy(&model, SIGNAL(columnsAboutToBeMoved(const QModelIndex &, int , int, const QModelIndex &, int))); - QSignalSpy columnsMovedSpy(&model, SIGNAL(columnsMoved(const QModelIndex &, int , int, const QModelIndex &, int))); + QSignalSpy columnsAboutToBeMovedSpy(&model, SIGNAL(columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); + QSignalSpy columnsMovedSpy(&model, SIGNAL(columnsMoved(QModelIndex,int,int,QModelIndex,int))); QVERIFY(columnsAboutToBeMovedSpy.isValid()); QVERIFY(columnsMovedSpy.isValid()); @@ -1022,8 +1022,8 @@ void tst_QAbstractItemModel::testMoveSameParentDown() } } - QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int))); - QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); + QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int))); QVERIFY(beforeSpy.isValid()); QVERIFY(afterSpy.isValid()); @@ -1137,8 +1137,8 @@ void tst_QAbstractItemModel::testMoveSameParentUp() } } - QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int))); - QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); + QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int))); QVERIFY(beforeSpy.isValid()); QVERIFY(afterSpy.isValid()); @@ -1286,8 +1286,8 @@ void tst_QAbstractItemModel::testMoveToGrandParent() } } - QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int))); - QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); + QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int))); QVERIFY(beforeSpy.isValid()); QVERIFY(afterSpy.isValid()); @@ -1426,8 +1426,8 @@ void tst_QAbstractItemModel::testMoveToSibling() persistentList << QPersistentModelIndex(idx); } - QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int))); - QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); + QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int))); QVERIFY(beforeSpy.isValid()); QVERIFY(afterSpy.isValid()); @@ -1576,8 +1576,8 @@ void tst_QAbstractItemModel::testMoveToUncle() persistentList << QPersistentModelIndex(idx); } - QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int))); - QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); + QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int))); QVERIFY(beforeSpy.isValid()); QVERIFY(afterSpy.isValid()); @@ -1683,8 +1683,8 @@ void tst_QAbstractItemModel::testMoveToDescendants() persistentList << QPersistentModelIndex(idx); } - QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int))); - QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); + QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int))); QVERIFY(beforeSpy.isValid()); QVERIFY(afterSpy.isValid()); @@ -1747,8 +1747,8 @@ void tst_QAbstractItemModel::testMoveWithinOwnRange() QFETCH(int, endRow); QFETCH(int, destRow); - QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int))); - QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); + QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int))); QVERIFY(beforeSpy.isValid()); QVERIFY(afterSpy.isValid()); diff --git a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp index 4bec2f5c0c..72a5c4a57b 100644 --- a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp +++ b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp @@ -597,7 +597,7 @@ void tst_QItemModel::setData() QFETCH(QString, modelType); currentModel = testModels->createModel(modelType); QVERIFY(currentModel); - QSignalSpy spy(currentModel, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &))); + QSignalSpy spy(currentModel, SIGNAL(dataChanged(QModelIndex,QModelIndex))); QVERIFY(spy.isValid()); QCOMPARE(currentModel->setData(QModelIndex(), QVariant()), false); QCOMPARE(spy.count(), 0); @@ -659,7 +659,7 @@ void tst_QItemModel::setHeaderData() QVERIFY(index.isValid()); qRegisterMetaType("Qt::Orientation"); - QSignalSpy spy(currentModel, SIGNAL(headerDataChanged( Qt::Orientation, int , int ))); + QSignalSpy spy(currentModel, SIGNAL(headerDataChanged(Qt::Orientation,int,int))); QVERIFY(spy.isValid()); QString text = "Index private pointers should always be the same"; @@ -838,10 +838,10 @@ void tst_QItemModel::remove() // When a row or column is removed there should be two signals. // Watch to make sure they are emitted and get the row/column count when they do get emitted by connecting them to a slot - QSignalSpy columnsAboutToBeRemovedSpy(currentModel, SIGNAL(columnsAboutToBeRemoved( const QModelIndex &, int , int ))); - QSignalSpy rowsAboutToBeRemovedSpy(currentModel, SIGNAL(rowsAboutToBeRemoved( const QModelIndex &, int , int ))); - QSignalSpy columnsRemovedSpy(currentModel, SIGNAL(columnsRemoved( const QModelIndex &, int, int ))); - QSignalSpy rowsRemovedSpy(currentModel, SIGNAL(rowsRemoved( const QModelIndex &, int, int ))); + QSignalSpy columnsAboutToBeRemovedSpy(currentModel, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int))); + QSignalSpy rowsAboutToBeRemovedSpy(currentModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int))); + QSignalSpy columnsRemovedSpy(currentModel, SIGNAL(columnsRemoved(QModelIndex,int,int))); + QSignalSpy rowsRemovedSpy(currentModel, SIGNAL(rowsRemoved(QModelIndex,int,int))); QSignalSpy modelResetSpy(currentModel, SIGNAL(modelReset())); QSignalSpy modelLayoutChangedSpy(currentModel, SIGNAL(layoutChanged())); @@ -860,10 +860,10 @@ void tst_QItemModel::remove() // // test removeRow() // - connect(currentModel, SIGNAL(rowsAboutToBeRemoved( const QModelIndex &, int , int )), - this, SLOT(slot_rowsAboutToRemove(const QModelIndex &))); - connect(currentModel, SIGNAL(rowsRemoved( const QModelIndex &, int , int )), - this, SLOT(slot_rowsRemoved(const QModelIndex &))); + connect(currentModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), + this, SLOT(slot_rowsAboutToRemove(QModelIndex))); + connect(currentModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(slot_rowsRemoved(QModelIndex))); int beforeRemoveRowCount = currentModel->rowCount(parentOfRemoved); QPersistentModelIndex dyingIndex = currentModel->index(start + count + 1, 0, parentOfRemoved); QCOMPARE(currentModel->removeRows(start, count, parentOfRemoved), shouldSucceed); @@ -921,20 +921,20 @@ void tst_QItemModel::remove() QCOMPARE(currentModel->rowCount(parentOfRemoved), beforeRemoveRowCount); } - disconnect(currentModel, SIGNAL(rowsAboutToBeRemoved( const QModelIndex &, int , int )), - this, SLOT(slot_rowsAboutToRemove(const QModelIndex &))); - disconnect(currentModel, SIGNAL(rowsRemoved( const QModelIndex &, int , int )), - this, SLOT(slot_rowsRemoved(const QModelIndex &))); + disconnect(currentModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), + this, SLOT(slot_rowsAboutToRemove(QModelIndex))); + disconnect(currentModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(slot_rowsRemoved(QModelIndex))); modelResetSpy.clear(); QCOMPARE(modelResetSpy.count(), 0); // // Test remove column // - connect(currentModel, SIGNAL(columnsAboutToBeRemoved( const QModelIndex &, int , int )), - this, SLOT(slot_columnsAboutToRemove(const QModelIndex &))); - connect(currentModel, SIGNAL(columnsRemoved( const QModelIndex &, int , int )), - this, SLOT(slot_columnsRemoved(const QModelIndex &))); + connect(currentModel, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)), + this, SLOT(slot_columnsAboutToRemove(QModelIndex))); + connect(currentModel, SIGNAL(columnsRemoved(QModelIndex,int,int)), + this, SLOT(slot_columnsRemoved(QModelIndex))); int beforeRemoveColumnCount = currentModel->columnCount(parentOfRemoved); // Some models don't let you remove the column, only row @@ -966,10 +966,10 @@ void tst_QItemModel::remove() else QCOMPARE(currentModel->rowCount(parentOfRemoved), beforeRemoveRowCount); } - disconnect(currentModel, SIGNAL(columnsAboutToBeRemoved( const QModelIndex &, int , int )), - this, SLOT(slot_columnsAboutToRemove(const QModelIndex &))); - disconnect(currentModel, SIGNAL(columnsRemoved( const QModelIndex &, int , int )), - this, SLOT(slot_columnsRemoved(const QModelIndex &))); + disconnect(currentModel, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)), + this, SLOT(slot_columnsAboutToRemove(QModelIndex))); + disconnect(currentModel, SIGNAL(columnsRemoved(QModelIndex,int,int)), + this, SLOT(slot_columnsRemoved(QModelIndex))); if (columnsAboutToBeRemovedSpy.count() > 0){ QList arguments = columnsAboutToBeRemovedSpy.at(0); @@ -1180,10 +1180,10 @@ void tst_QItemModel::insert() // When a row or column is inserted there should be two signals. // Watch to make sure they are emitted and get the row/column count when they do get emitted by connecting them to a slot - QSignalSpy columnsAboutToBeInsertedSpy(currentModel, SIGNAL(columnsAboutToBeInserted( const QModelIndex &, int , int ))); - QSignalSpy rowsAboutToBeInsertedSpy(currentModel, SIGNAL(rowsAboutToBeInserted( const QModelIndex &, int , int ))); - QSignalSpy columnsInsertedSpy(currentModel, SIGNAL(columnsInserted( const QModelIndex &, int, int ))); - QSignalSpy rowsInsertedSpy(currentModel, SIGNAL(rowsInserted( const QModelIndex &, int, int ))); + QSignalSpy columnsAboutToBeInsertedSpy(currentModel, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int))); + QSignalSpy rowsAboutToBeInsertedSpy(currentModel, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int))); + QSignalSpy columnsInsertedSpy(currentModel, SIGNAL(columnsInserted(QModelIndex,int,int))); + QSignalSpy rowsInsertedSpy(currentModel, SIGNAL(rowsInserted(QModelIndex,int,int))); QSignalSpy modelResetSpy(currentModel, SIGNAL(modelReset())); QSignalSpy modelLayoutChangedSpy(currentModel, SIGNAL(layoutChanged())); @@ -1202,10 +1202,10 @@ void tst_QItemModel::insert() // // test insertRow() // - connect(currentModel, SIGNAL(rowsAboutToBeInserted( const QModelIndex &, int , int )), - this, SLOT(slot_rowsAboutToInserted(const QModelIndex &))); - connect(currentModel, SIGNAL(rowsInserted( const QModelIndex &, int , int )), - this, SLOT(slot_rowsInserted(const QModelIndex &))); + connect(currentModel, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)), + this, SLOT(slot_rowsAboutToInserted(QModelIndex))); + connect(currentModel, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(slot_rowsInserted(QModelIndex))); int beforeInsertRowCount = currentModel->rowCount(parentOfInserted); QCOMPARE(currentModel->insertRows(start, count, parentOfInserted), shouldSucceed); currentModel->submit(); @@ -1259,19 +1259,19 @@ void tst_QItemModel::insert() QCOMPARE(currentModel->rowCount(parentOfInserted), beforeInsertRowCount); } - disconnect(currentModel, SIGNAL(rowsAboutToBeInserted( const QModelIndex &, int , int )), - this, SLOT(slot_rowsAboutToInserted(const QModelIndex &))); - disconnect(currentModel, SIGNAL(rowsInserted( const QModelIndex &, int , int )), - this, SLOT(slot_rowsInserted(const QModelIndex &))); + disconnect(currentModel, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)), + this, SLOT(slot_rowsAboutToInserted(QModelIndex))); + disconnect(currentModel, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(slot_rowsInserted(QModelIndex))); modelResetSpy.clear(); // // Test insertColumn() // - connect(currentModel, SIGNAL(columnsAboutToBeInserted( const QModelIndex &, int , int )), - this, SLOT(slot_columnsAboutToInserted(const QModelIndex &))); - connect(currentModel, SIGNAL(columnsInserted( const QModelIndex &, int , int )), - this, SLOT(slot_columnsInserted(const QModelIndex &))); + connect(currentModel, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)), + this, SLOT(slot_columnsAboutToInserted(QModelIndex))); + connect(currentModel, SIGNAL(columnsInserted(QModelIndex,int,int)), + this, SLOT(slot_columnsInserted(QModelIndex))); int beforeInsertColumnCount = currentModel->columnCount(parentOfInserted); // Some models don't let you insert the column, only row @@ -1303,10 +1303,10 @@ void tst_QItemModel::insert() else QCOMPARE(currentModel->rowCount(parentOfInserted), beforeInsertRowCount); } - disconnect(currentModel, SIGNAL(columnsAboutToBeInserted( const QModelIndex &, int , int )), - this, SLOT(slot_columnsAboutToInserted(const QModelIndex &))); - disconnect(currentModel, SIGNAL(columnsInserted( const QModelIndex &, int , int )), - this, SLOT(slot_columnsInserted(const QModelIndex &))); + disconnect(currentModel, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)), + this, SLOT(slot_columnsAboutToInserted(QModelIndex))); + disconnect(currentModel, SIGNAL(columnsInserted(QModelIndex,int,int)), + this, SLOT(slot_columnsInserted(QModelIndex))); if (columnsAboutToBeInsertedSpy.count() > 0){ QList arguments = columnsAboutToBeInsertedSpy.at(0); diff --git a/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp b/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp index 43d2ba496e..a58a0ad945 100644 --- a/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp +++ b/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp @@ -2231,7 +2231,7 @@ void tst_QItemSelectionModel::childrenDeselectionSignal() QItemSelectionModel selectionModel(&model); selectionModel.select(sel, QItemSelectionModel::SelectCurrent); - QSignalSpy deselectSpy(&selectionModel, SIGNAL(selectionChanged(const QItemSelection& , const QItemSelection&))); + QSignalSpy deselectSpy(&selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection))); QVERIFY(deselectSpy.isValid()); model.removeRows(0, 1, root); QVERIFY(deselectSpy.count() == 1); @@ -2383,7 +2383,7 @@ public: RemovalObserver(QItemSelectionModel *selectionModel) : m_itemSelectionModel(selectionModel) { - connect(m_itemSelectionModel, SIGNAL(selectionChanged(QItemSelection, QItemSelection)), SLOT(selectionChanged(QItemSelection, QItemSelection))); + connect(m_itemSelectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(selectionChanged(QItemSelection,QItemSelection))); } public slots: @@ -2414,7 +2414,7 @@ void tst_QItemSelectionModel::deselectRemovedMiddleRange() RemovalObserver ro(&selModel); - QSignalSpy spy(&selModel, SIGNAL(selectionChanged(QItemSelection, QItemSelection))); + QSignalSpy spy(&selModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection))); QVERIFY(spy.isValid()); bool ok = model.removeRows(4, 2); diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp index baedcf71b4..e3dc0d3e14 100644 --- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp +++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp @@ -1473,7 +1473,7 @@ void tst_QSortFilterProxyModel::filterCurrent() view.show(); view.setModel(&proxy); - QSignalSpy spy(view.selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex))); + QSignalSpy spy(view.selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex))); QVERIFY(spy.isValid()); view.setCurrentIndex(proxy.index(0, 0)); @@ -1594,10 +1594,10 @@ void tst_QSortFilterProxyModel::removeSourceRows() proxy.sort(0, static_cast(sortOrder)); (void)proxy.rowCount(QModelIndex()); // force mapping - QSignalSpy removeSpy(&proxy, SIGNAL(rowsRemoved(QModelIndex, int, int))); - QSignalSpy insertSpy(&proxy, SIGNAL(rowsInserted(QModelIndex, int, int))); - QSignalSpy aboutToRemoveSpy(&proxy, SIGNAL(rowsAboutToBeRemoved(QModelIndex, int, int))); - QSignalSpy aboutToInsertSpy(&proxy, SIGNAL(rowsAboutToBeInserted(QModelIndex, int, int))); + QSignalSpy removeSpy(&proxy, SIGNAL(rowsRemoved(QModelIndex,int,int))); + QSignalSpy insertSpy(&proxy, SIGNAL(rowsInserted(QModelIndex,int,int))); + QSignalSpy aboutToRemoveSpy(&proxy, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int))); + QSignalSpy aboutToInsertSpy(&proxy, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int))); QVERIFY(removeSpy.isValid()); QVERIFY(insertSpy.isValid()); @@ -1775,8 +1775,8 @@ void tst_QSortFilterProxyModel::changeFilter() proxy.sort(0, static_cast(sortOrder)); (void)proxy.rowCount(QModelIndex()); // force mapping - QSignalSpy initialRemoveSpy(&proxy, SIGNAL(rowsRemoved(QModelIndex, int, int))); - QSignalSpy initialInsertSpy(&proxy, SIGNAL(rowsInserted(QModelIndex, int, int))); + QSignalSpy initialRemoveSpy(&proxy, SIGNAL(rowsRemoved(QModelIndex,int,int))); + QSignalSpy initialInsertSpy(&proxy, SIGNAL(rowsInserted(QModelIndex,int,int))); QVERIFY(initialRemoveSpy.isValid()); QVERIFY(initialInsertSpy.isValid()); @@ -1799,8 +1799,8 @@ void tst_QSortFilterProxyModel::changeFilter() QCOMPARE(proxy.data(index, Qt::DisplayRole).toString(), initialProxyItems.at(i)); } - QSignalSpy finalRemoveSpy(&proxy, SIGNAL(rowsRemoved(QModelIndex, int, int))); - QSignalSpy finalInsertSpy(&proxy, SIGNAL(rowsInserted(QModelIndex, int, int))); + QSignalSpy finalRemoveSpy(&proxy, SIGNAL(rowsRemoved(QModelIndex,int,int))); + QSignalSpy finalInsertSpy(&proxy, SIGNAL(rowsInserted(QModelIndex,int,int))); QVERIFY(finalRemoveSpy.isValid()); QVERIFY(finalInsertSpy.isValid()); @@ -1950,8 +1950,8 @@ void tst_QSortFilterProxyModel::changeSourceData() proxy.setFilterRegExp(filter); - QSignalSpy removeSpy(&proxy, SIGNAL(rowsRemoved(QModelIndex, int, int))); - QSignalSpy insertSpy(&proxy, SIGNAL(rowsInserted(QModelIndex, int, int))); + QSignalSpy removeSpy(&proxy, SIGNAL(rowsRemoved(QModelIndex,int,int))); + QSignalSpy insertSpy(&proxy, SIGNAL(rowsInserted(QModelIndex,int,int))); QVERIFY(removeSpy.isValid()); QVERIFY(insertSpy.isValid()); @@ -2049,7 +2049,7 @@ void tst_QSortFilterProxyModel::selectionFilteredOut() view.show(); view.setModel(&proxy); - QSignalSpy spy(view.selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex))); + QSignalSpy spy(view.selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex))); QVERIFY(spy.isValid()); view.setCurrentIndex(proxy.index(0, 0)); @@ -2164,8 +2164,8 @@ void tst_QSortFilterProxyModel::insertIntoChildrenlessItem() QSortFilterProxyModel proxy; proxy.setSourceModel(&model); - QSignalSpy colsInsertedSpy(&proxy, SIGNAL(columnsInserted(const QModelIndex&, int, int))); - QSignalSpy rowsInsertedSpy(&proxy, SIGNAL(rowsInserted(const QModelIndex&, int, int))); + QSignalSpy colsInsertedSpy(&proxy, SIGNAL(columnsInserted(QModelIndex,int,int))); + QSignalSpy rowsInsertedSpy(&proxy, SIGNAL(rowsInserted(QModelIndex,int,int))); QVERIFY(colsInsertedSpy.isValid()); QVERIFY(rowsInsertedSpy.isValid()); @@ -2244,7 +2244,7 @@ void tst_QSortFilterProxyModel::insertRowIntoFilteredParent() EvenOddFilterModel proxy; proxy.setSourceModel(&model); - QSignalSpy spy(&proxy, SIGNAL(rowsInserted(const QModelIndex&, int, int))); + QSignalSpy spy(&proxy, SIGNAL(rowsInserted(QModelIndex,int,int))); QVERIFY(spy.isValid()); QStandardItem *itemA = new QStandardItem(); @@ -2273,8 +2273,8 @@ void tst_QSortFilterProxyModel::filterOutParentAndFilterInChild() QStandardItem *itemC = new QStandardItem("C"); itemA->appendRow(itemC); // filtered - QSignalSpy removedSpy(&proxy, SIGNAL(rowsRemoved(const QModelIndex&, int, int))); - QSignalSpy insertedSpy(&proxy, SIGNAL(rowsInserted(const QModelIndex&, int, int))); + QSignalSpy removedSpy(&proxy, SIGNAL(rowsRemoved(QModelIndex,int,int))); + QSignalSpy insertedSpy(&proxy, SIGNAL(rowsInserted(QModelIndex,int,int))); QVERIFY(removedSpy.isValid()); QVERIFY(insertedSpy.isValid()); diff --git a/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp b/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp index a99941aa7f..0e0e869f69 100644 --- a/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp +++ b/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp @@ -144,11 +144,11 @@ void tst_QStringListModel::rowsAboutToBeRemoved_rowsRemoved() QStringListModel *model = new QStringListModel(input); QModelListener *pListener = new QModelListener(&aboutto, &res, model); - pListener->connect(model, SIGNAL( rowsAboutToBeRemoved(const QModelIndex & , int , int )), - pListener, SLOT( rowsAboutToBeRemovedOrInserted(const QModelIndex & , int , int )) ); + pListener->connect(model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), + pListener, SLOT(rowsAboutToBeRemovedOrInserted(QModelIndex,int,int)) ); - pListener->connect(model, SIGNAL( rowsRemoved(const QModelIndex & , int , int )), - pListener, SLOT( rowsRemovedOrInserted(const QModelIndex & , int , int )) ); + pListener->connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), + pListener, SLOT(rowsRemovedOrInserted(QModelIndex,int,int)) ); model->removeRows(row,count); // At this point, control goes to our connected slots inn this order: @@ -208,11 +208,11 @@ void tst_QStringListModel::rowsAboutToBeInserted_rowsInserted() QStringListModel *model = new QStringListModel(input); QModelListener *pListener = new QModelListener(&aboutto, &res, model); - connect(model, SIGNAL( rowsAboutToBeInserted(const QModelIndex & , int , int )), - pListener, SLOT( rowsAboutToBeRemovedOrInserted(const QModelIndex & , int , int )) ); + connect(model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)), + pListener, SLOT(rowsAboutToBeRemovedOrInserted(QModelIndex,int,int)) ); - connect(model, SIGNAL( rowsInserted(const QModelIndex & , int , int )), - pListener, SLOT( rowsRemovedOrInserted(const QModelIndex & , int , int )) ); + connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), + pListener, SLOT(rowsRemovedOrInserted(QModelIndex,int,int)) ); model->insertRows(row,count); // At this point, control goes to our connected slots inn this order: diff --git a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.cpp b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.cpp index 86c810fe15..964f5cd26b 100644 --- a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.cpp +++ b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.cpp @@ -99,9 +99,9 @@ void Disconnector::received () if (::Step == 5) { - disconnect (s, SIGNAL (fired ()), s->d, SLOT (received ())); + disconnect (s, SIGNAL(fired()), s->d, SLOT(received())); - connect (&RandomSender, SIGNAL (fired ()), s->d, SLOT (received ())); + connect (&RandomSender, SIGNAL(fired()), s->d, SLOT(received())); } TRACE (stepCopy, "ends Disconnector::received()"); @@ -113,9 +113,9 @@ Sender::Sender (Receiver *r, Disconnector *d) { this->r = r; this->d = d; if (r) - connect (this, SIGNAL (fired ()), r, SLOT (received ())); + connect (this, SIGNAL(fired()), r, SLOT(received())); if (d) - connect (this, SIGNAL (fired ()), d, SLOT (received ())); + connect (this, SIGNAL(fired()), d, SLOT(received())); }; void Sender::fire () diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index 4ae28d1210..0cabc46390 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -257,11 +257,11 @@ void tst_QObject::disconnect() ReceiverObject *r1 = new ReceiverObject; ReceiverObject *r2 = new ReceiverObject; - connect( s, SIGNAL( signal1() ), r1, SLOT( slot1() ) ); + connect( s, SIGNAL(signal1()), r1, SLOT(slot1()) ); - connect( s, SIGNAL( signal2() ), r1, SLOT( slot2() ) ); - connect( s, SIGNAL( signal3() ), r1, SLOT( slot3() ) ); - connect( s, SIGNAL( signal4() ), r1, SLOT( slot4() ) ); + connect( s, SIGNAL(signal2()), r1, SLOT(slot2()) ); + connect( s, SIGNAL(signal3()), r1, SLOT(slot3()) ); + connect( s, SIGNAL(signal4()), r1, SLOT(slot4()) ); s->emitSignal1(); s->emitSignal2(); @@ -275,7 +275,7 @@ void tst_QObject::disconnect() r1->reset(); // usual disconnect with all parameters given - bool ret = QObject::disconnect( s, SIGNAL( signal1() ), r1, SLOT( slot1() ) ); + bool ret = QObject::disconnect( s, SIGNAL(signal1()), r1, SLOT(slot1()) ); s->emitSignal1(); @@ -283,7 +283,7 @@ void tst_QObject::disconnect() r1->reset(); QVERIFY(ret); - ret = QObject::disconnect( s, SIGNAL( signal1() ), r1, SLOT( slot1() ) ); + ret = QObject::disconnect( s, SIGNAL(signal1()), r1, SLOT(slot1()) ); QVERIFY(!ret); // disconnect all signals from s from all slots from r1 @@ -298,13 +298,13 @@ void tst_QObject::disconnect() QVERIFY(!r1->called(4)); r1->reset(); - connect( s, SIGNAL( signal1() ), r1, SLOT( slot1() ) ); - connect( s, SIGNAL( signal1() ), r1, SLOT( slot2() ) ); - connect( s, SIGNAL( signal1() ), r1, SLOT( slot3() ) ); - connect( s, SIGNAL( signal2() ), r1, SLOT( slot4() ) ); + connect( s, SIGNAL(signal1()), r1, SLOT(slot1()) ); + connect( s, SIGNAL(signal1()), r1, SLOT(slot2()) ); + connect( s, SIGNAL(signal1()), r1, SLOT(slot3()) ); + connect( s, SIGNAL(signal2()), r1, SLOT(slot4()) ); // disconnect s's signal1() from all slots of r1 - QObject::disconnect( s, SIGNAL( signal1() ), r1, 0 ); + QObject::disconnect( s, SIGNAL(signal1()), r1, 0 ); s->emitSignal1(); s->emitSignal2(); @@ -317,15 +317,15 @@ void tst_QObject::disconnect() // make sure all is disconnected again QObject::disconnect( s, 0, r1, 0 ); - connect( s, SIGNAL( signal1() ), r1, SLOT( slot1() ) ); - connect( s, SIGNAL( signal1() ), r2, SLOT( slot1() ) ); - connect( s, SIGNAL( signal2() ), r1, SLOT( slot2() ) ); - connect( s, SIGNAL( signal2() ), r2, SLOT( slot2() ) ); - connect( s, SIGNAL( signal3() ), r1, SLOT( slot3() ) ); - connect( s, SIGNAL( signal3() ), r2, SLOT( slot3() ) ); + connect( s, SIGNAL(signal1()), r1, SLOT(slot1()) ); + connect( s, SIGNAL(signal1()), r2, SLOT(slot1()) ); + connect( s, SIGNAL(signal2()), r1, SLOT(slot2()) ); + connect( s, SIGNAL(signal2()), r2, SLOT(slot2()) ); + connect( s, SIGNAL(signal3()), r1, SLOT(slot3()) ); + connect( s, SIGNAL(signal3()), r2, SLOT(slot3()) ); // disconnect signal1() from all receivers - QObject::disconnect( s, SIGNAL( signal1() ), 0, 0 ); + QObject::disconnect( s, SIGNAL(signal1()), 0, 0 ); s->emitSignal1(); s->emitSignal2(); s->emitSignal3(); @@ -3378,7 +3378,7 @@ void tst_QObject::disconnectSelfInSlotAndDeleteAfterEmit() void tst_QObject::dumpObjectInfo() { QObject a, b; - QObject::connect(&a, SIGNAL(destroyed(QObject *)), &b, SLOT(deleteLater())); + QObject::connect(&a, SIGNAL(destroyed(QObject*)), &b, SLOT(deleteLater())); a.disconnect(&b); #ifdef QT_DEBUG QTest::ignoreMessage(QtDebugMsg, "OBJECT QObject::unnamed"); @@ -3442,10 +3442,10 @@ void tst_QObject::uniqConnection() r2->reset(); ReceiverObject::sequence = 0; - QVERIFY( connect( s, SIGNAL( signal1() ), r1, SLOT( slot1() ) , Qt::UniqueConnection) ); - QVERIFY( connect( s, SIGNAL( signal1() ), r2, SLOT( slot1() ) , Qt::UniqueConnection) ); - QVERIFY( connect( s, SIGNAL( signal1() ), r1, SLOT( slot3() ) , Qt::UniqueConnection) ); - QVERIFY( connect( s, SIGNAL( signal3() ), r1, SLOT( slot3() ) , Qt::UniqueConnection) ); + QVERIFY( connect( s, SIGNAL(signal1()), r1, SLOT(slot1()) , Qt::UniqueConnection) ); + QVERIFY( connect( s, SIGNAL(signal1()), r2, SLOT(slot1()) , Qt::UniqueConnection) ); + QVERIFY( connect( s, SIGNAL(signal1()), r1, SLOT(slot3()) , Qt::UniqueConnection) ); + QVERIFY( connect( s, SIGNAL(signal3()), r1, SLOT(slot3()) , Qt::UniqueConnection) ); s->emitSignal1(); s->emitSignal2(); @@ -3468,11 +3468,11 @@ void tst_QObject::uniqConnection() r2->reset(); ReceiverObject::sequence = 0; - QVERIFY( connect( s, SIGNAL( signal4() ), r1, SLOT( slot4() ) , Qt::UniqueConnection) ); - QVERIFY( connect( s, SIGNAL( signal4() ), r2, SLOT( slot4() ) , Qt::UniqueConnection) ); - QVERIFY(!connect( s, SIGNAL( signal4() ), r2, SLOT( slot4() ) , Qt::UniqueConnection) ); - QVERIFY( connect( s, SIGNAL( signal1() ), r2, SLOT( slot4() ) , Qt::UniqueConnection) ); - QVERIFY(!connect( s, SIGNAL( signal4() ), r1, SLOT( slot4() ) , Qt::UniqueConnection) ); + QVERIFY( connect( s, SIGNAL(signal4()), r1, SLOT(slot4()) , Qt::UniqueConnection) ); + QVERIFY( connect( s, SIGNAL(signal4()), r2, SLOT(slot4()) , Qt::UniqueConnection) ); + QVERIFY(!connect( s, SIGNAL(signal4()), r2, SLOT(slot4()) , Qt::UniqueConnection) ); + QVERIFY( connect( s, SIGNAL(signal1()), r2, SLOT(slot4()) , Qt::UniqueConnection) ); + QVERIFY(!connect( s, SIGNAL(signal4()), r1, SLOT(slot4()) , Qt::UniqueConnection) ); s->emitSignal4(); QCOMPARE( r1->count_slot4, 1 ); @@ -3484,7 +3484,7 @@ void tst_QObject::uniqConnection() r2->reset(); ReceiverObject::sequence = 0; - connect( s, SIGNAL( signal4() ), r1, SLOT( slot4() ) ); + connect( s, SIGNAL(signal4()), r1, SLOT(slot4()) ); s->emitSignal4(); QCOMPARE( r1->count_slot4, 2 ); @@ -3637,11 +3637,11 @@ void tst_QObject::overloads() obj2.s_num = 0; connect (&obj1, SIGNAL(sig(int)) , &obj1, SLOT(slo(int))); - connect (&obj1, SIGNAL(sig(QObject *, QObject *, QObject *)) , &obj1, SLOT(slo(QObject * , QObject *, QObject *))); + connect (&obj1, SIGNAL(sig(QObject*,QObject*,QObject*)) , &obj1, SLOT(slo(QObject*,QObject*,QObject*))); - connect (&obj1, SIGNAL(sig(QObject *, QObject *, QObject *, QObject *)) , &obj2, SLOT(slo(QObject * , QObject *, QObject *))); - connect (&obj1, SIGNAL(sig(QObject *)) , &obj2, SLOT(slo())); - connect (&obj1, SIGNAL(sig(int, int)) , &obj2, SLOT(slo(int, int))); + connect (&obj1, SIGNAL(sig(QObject*,QObject*,QObject*,QObject*)) , &obj2, SLOT(slo(QObject*,QObject*,QObject*))); + connect (&obj1, SIGNAL(sig(QObject*)) , &obj2, SLOT(slo())); + connect (&obj1, SIGNAL(sig(int,int)) , &obj2, SLOT(slo(int,int))); emit obj1.sig(0.5); //connected to nothing emit obj1.sig(1, 'a'); //connected to nothing diff --git a/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp b/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp index 472be15512..4b188368ee 100644 --- a/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp +++ b/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp @@ -102,7 +102,7 @@ void tst_QSignalMapper::mapped() mapper.setMapping(&src3, "three"); connect(&mapper, SIGNAL(mapped(int)), &target, SLOT(myslot(int))); - connect(&mapper, SIGNAL(mapped(const QString &)), &target, SLOT(myslot(const QString &))); + connect(&mapper, SIGNAL(mapped(QString)), &target, SLOT(myslot(QString))); src1.emit_mysignal(20); QVERIFY(target.id == 1); diff --git a/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp b/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp index 6fe9fe11bc..d059a8bf1d 100644 --- a/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp +++ b/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp @@ -2333,13 +2333,13 @@ void tst_QStateMachine::signalTransitions() SignalEmitter emitter; QState *s0 = new QState(&machine); QFinalState *s1 = new QFinalState(&machine); - QSignalTransition *t0 = s0->addTransition(&emitter, SIGNAL( signalWithNoArg( ) ), s1); + QSignalTransition *t0 = s0->addTransition(&emitter, SIGNAL(signalWithNoArg()), s1); QVERIFY(t0 != 0); - QCOMPARE(t0->signal(), QByteArray(SIGNAL( signalWithNoArg( ) ))); + QCOMPARE(t0->signal(), QByteArray(SIGNAL(signalWithNoArg()))); - QSignalTransition *t1 = s0->addTransition(&emitter, SIGNAL( signalWithStringArg( const QString & ) ), s1); + QSignalTransition *t1 = s0->addTransition(&emitter, SIGNAL(signalWithStringArg(QString)), s1); QVERIFY(t1 != 0); - QCOMPARE(t1->signal(), QByteArray(SIGNAL( signalWithStringArg( const QString & ) ))); + QCOMPARE(t1->signal(), QByteArray(SIGNAL(signalWithStringArg(QString)))); QSignalSpy startedSpy(&machine, SIGNAL(started())); QSignalSpy finishedSpy(&machine, SIGNAL(finished())); @@ -3503,11 +3503,11 @@ void tst_QStateMachine::overrideDefaultAnimationWithSpecific() s1->addTransition(at); QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo"); - connect(defaultAnimation, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)), &counter, SLOT(slot())); + connect(defaultAnimation, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)), &counter, SLOT(slot())); QPropertyAnimation *moreSpecificAnimation = new QPropertyAnimation(object, "foo"); s2->addTransition(moreSpecificAnimation, SIGNAL(finished()), s3); - connect(moreSpecificAnimation, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)), &counter, SLOT(slot())); + connect(moreSpecificAnimation, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)), &counter, SLOT(slot())); machine.addDefaultAnimation(defaultAnimation); at->addAnimation(moreSpecificAnimation); @@ -4742,7 +4742,7 @@ void tst_QStateMachine::signalTransitionNormalizeSignature() machine.setInitialState(s0); QState *s1 = new QState(&machine); SignalEmitter emitter; - TestSignalTransition *t0 = new TestSignalTransition(&emitter, SIGNAL( signalWithNoArg( ) ), s1); + TestSignalTransition *t0 = new TestSignalTransition(&emitter, SIGNAL(signalWithNoArg()), s1); s0->addTransition(t0); machine.start(); diff --git a/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp b/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp index c68a33279c..949bcc5074 100644 --- a/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp +++ b/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp @@ -370,7 +370,7 @@ void tst_QFutureWatcher::watchFinishedFuture() connect(&watcher, SIGNAL(canceled()), &object, SLOT(canceled())); connect(&watcher, SIGNAL(finished()), &object, SLOT(finished())); connect(&watcher, SIGNAL(progressValueChanged(int)), &object, SLOT(progressValueChanged(int))); - connect(&watcher, SIGNAL(progressRangeChanged(int, int)), &object, SLOT(progressRangeChanged(int, int))); + connect(&watcher, SIGNAL(progressRangeChanged(int,int)), &object, SLOT(progressRangeChanged(int,int))); #endif connect(&watcher, SIGNAL(resultReadyAt(int)), &object, SLOT(resultReadyAt(int))); @@ -404,7 +404,7 @@ void tst_QFutureWatcher::watchCanceledFuture() connect(&watcher, SIGNAL(canceled()), &object, SLOT(canceled())); connect(&watcher, SIGNAL(finished()), &object, SLOT(finished())); connect(&watcher, SIGNAL(progressValueChanged(int)), &object, SLOT(progressValueChanged(int))); - connect(&watcher, SIGNAL(progressRangeChanged(int, int)), &object, SLOT(progressRangeChanged(int, int))); + connect(&watcher, SIGNAL(progressRangeChanged(int,int)), &object, SLOT(progressRangeChanged(int,int))); #endif connect(&watcher, SIGNAL(resultReadyAt(int)), &object, SLOT(resultReadyAt(int))); @@ -528,10 +528,10 @@ void tst_QFutureWatcher::progressText() QObject::connect(&watcher, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); #ifdef PRINT QObject::connect(&watcher, SIGNAL(progressValueChanged(int)), &o, SLOT(printProgress(int))); - QObject::connect(&watcher, SIGNAL(progressTextChanged(const QString &)), &o, SLOT(printText(const QString &))); + QObject::connect(&watcher, SIGNAL(progressTextChanged(QString)), &o, SLOT(printText(QString))); #endif QObject::connect(&watcher, SIGNAL(progressValueChanged(int)), &o, SLOT(registerProgress(int))); - QObject::connect(&watcher, SIGNAL(progressTextChanged(const QString &)), &o, SLOT(registerText(const QString &))); + QObject::connect(&watcher, SIGNAL(progressTextChanged(QString)), &o, SLOT(registerText(QString))); watcher.setFuture(f); QTestEventLoop::instance().enterLoop(5); diff --git a/tests/auto/other/modeltest/modeltest.cpp b/tests/auto/other/modeltest/modeltest.cpp index 25539b52b4..f8338dc6fa 100644 --- a/tests/auto/other/modeltest/modeltest.cpp +++ b/tests/auto/other/modeltest/modeltest.cpp @@ -56,48 +56,48 @@ ModelTest::ModelTest ( QAbstractItemModel *_model, QObject *parent ) : QObject ( if (!model) qFatal("%s: model must not be null", Q_FUNC_INFO); - connect ( model, SIGNAL ( columnsAboutToBeInserted ( const QModelIndex &, int, int ) ), - this, SLOT ( runAllTests() ) ); - connect ( model, SIGNAL ( columnsAboutToBeRemoved ( const QModelIndex &, int, int ) ), - this, SLOT ( runAllTests() ) ); - connect ( model, SIGNAL ( columnsInserted ( const QModelIndex &, int, int ) ), - this, SLOT ( runAllTests() ) ); - connect ( model, SIGNAL ( columnsRemoved ( const QModelIndex &, int, int ) ), - this, SLOT ( runAllTests() ) ); - connect ( model, SIGNAL ( dataChanged ( const QModelIndex &, const QModelIndex & ) ), - this, SLOT ( runAllTests() ) ); - connect ( model, SIGNAL ( headerDataChanged ( Qt::Orientation, int, int ) ), - this, SLOT ( runAllTests() ) ); - connect ( model, SIGNAL ( layoutAboutToBeChanged () ), this, SLOT ( runAllTests() ) ); - connect ( model, SIGNAL ( layoutChanged () ), this, SLOT ( runAllTests() ) ); - connect ( model, SIGNAL ( modelReset () ), this, SLOT ( runAllTests() ) ); - connect ( model, SIGNAL ( rowsAboutToBeInserted ( const QModelIndex &, int, int ) ), - this, SLOT ( runAllTests() ) ); - connect ( model, SIGNAL ( rowsAboutToBeRemoved ( const QModelIndex &, int, int ) ), - this, SLOT ( runAllTests() ) ); - connect ( model, SIGNAL ( rowsInserted ( const QModelIndex &, int, int ) ), - this, SLOT ( runAllTests() ) ); - connect ( model, SIGNAL ( rowsRemoved ( const QModelIndex &, int, int ) ), - this, SLOT ( runAllTests() ) ); + connect(model, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)), + this, SLOT(runAllTests()) ); + connect(model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)), + this, SLOT(runAllTests()) ); + connect(model, SIGNAL(columnsInserted(QModelIndex,int,int)), + this, SLOT(runAllTests()) ); + connect(model, SIGNAL(columnsRemoved(QModelIndex,int,int)), + this, SLOT(runAllTests()) ); + connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), + this, SLOT(runAllTests()) ); + connect(model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)), + this, SLOT(runAllTests()) ); + connect(model, SIGNAL(layoutAboutToBeChanged()), this, SLOT(runAllTests()) ); + connect(model, SIGNAL(layoutChanged()), this, SLOT(runAllTests()) ); + connect(model, SIGNAL(modelReset()), this, SLOT(runAllTests()) ); + connect(model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)), + this, SLOT(runAllTests()) ); + connect(model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), + this, SLOT(runAllTests()) ); + connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(runAllTests()) ); + connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(runAllTests()) ); // Special checks for changes - connect ( model, SIGNAL ( layoutAboutToBeChanged() ), - this, SLOT ( layoutAboutToBeChanged() ) ); - connect ( model, SIGNAL ( layoutChanged() ), - this, SLOT ( layoutChanged() ) ); - - connect ( model, SIGNAL ( rowsAboutToBeInserted ( const QModelIndex &, int, int ) ), - this, SLOT ( rowsAboutToBeInserted ( const QModelIndex &, int, int ) ) ); - connect ( model, SIGNAL ( rowsAboutToBeRemoved ( const QModelIndex &, int, int ) ), - this, SLOT ( rowsAboutToBeRemoved ( const QModelIndex &, int, int ) ) ); - connect ( model, SIGNAL ( rowsInserted ( const QModelIndex &, int, int ) ), - this, SLOT ( rowsInserted ( const QModelIndex &, int, int ) ) ); - connect ( model, SIGNAL ( rowsRemoved ( const QModelIndex &, int, int ) ), - this, SLOT ( rowsRemoved ( const QModelIndex &, int, int ) ) ); - connect ( model, SIGNAL ( dataChanged ( const QModelIndex &, const QModelIndex & ) ), - this, SLOT ( dataChanged ( const QModelIndex &, const QModelIndex & ) ) ); - connect ( model, SIGNAL ( headerDataChanged ( Qt::Orientation, int, int ) ), - this, SLOT ( headerDataChanged ( Qt::Orientation, int, int ) ) ); + connect(model, SIGNAL(layoutAboutToBeChanged()), + this, SLOT(layoutAboutToBeChanged()) ); + connect(model, SIGNAL(layoutChanged()), + this, SLOT(layoutChanged()) ); + + connect(model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)), + this, SLOT(rowsAboutToBeInserted(QModelIndex,int,int)) ); + connect(model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), + this, SLOT(rowsAboutToBeRemoved(QModelIndex,int,int)) ); + connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(rowsInserted(QModelIndex,int,int)) ); + connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(rowsRemoved(QModelIndex,int,int)) ); + connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), + this, SLOT(dataChanged(QModelIndex,QModelIndex)) ); + connect(model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)), + this, SLOT(headerDataChanged(Qt::Orientation,int,int)) ); runAllTests(); } diff --git a/tests/benchmarks/corelib/kernel/qobject/main.cpp b/tests/benchmarks/corelib/kernel/qobject/main.cpp index 90880f9672..298388e531 100644 --- a/tests/benchmarks/corelib/kernel/qobject/main.cpp +++ b/tests/benchmarks/corelib/kernel/qobject/main.cpp @@ -198,8 +198,8 @@ void QObjectBenchmark::connect_disconnect_benchmark() case 1: { QTreeView obj; QBENCHMARK { - QObject::connect (&obj, SIGNAL(viewportEntered( )), &obj, SLOT(expandAll( ))); - QObject::disconnect(&obj, SIGNAL(viewportEntered( )), &obj, SLOT(expandAll( ))); + QObject::connect (&obj, SIGNAL(viewportEntered( )), &obj, SLOT(expandAll( ))); // sic: non-normalised + QObject::disconnect(&obj, SIGNAL(viewportEntered( )), &obj, SLOT(expandAll( ))); // sic: non-normalised } } break; case 2: { @@ -218,7 +218,7 @@ void QObjectBenchmark::connect_disconnect_benchmark() case 4: { QTreeView obj; QBENCHMARK { - QObject::disconnect(QObject::connect(&obj, SIGNAL(viewportEntered( )), &obj, SLOT(expandAll( )))); + QObject::disconnect(QObject::connect(&obj, SIGNAL(viewportEntered( )), &obj, SLOT(expandAll( )))); // sic: non-normalised } } break; case 5: { -- cgit v1.2.3