diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-08-06 06:23:07 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-08-06 06:23:07 (GMT) |
commit | 57ceb11ecf95032418712a686418116cf2398e7a (patch) | |
tree | 378533fcc07983d3a1b461aaaad07d842e50b81c /tests/auto/qstatemachine | |
parent | 90d4366f1e9657b3240a872698614c7d9747f9e0 (diff) | |
parent | a4fc85c75f068b73f9c2334c77b0ae2275510e17 (diff) | |
download | Qt-57ceb11ecf95032418712a686418116cf2398e7a.zip Qt-57ceb11ecf95032418712a686418116cf2398e7a.tar.gz Qt-57ceb11ecf95032418712a686418116cf2398e7a.tar.bz2 |
Merge commit 'origin/master'
Conflicts:
tests/auto/qfilesystemmodel/qfilesystemmodel.pro
tests/auto/qfontdialog/tst_qfontdialog.cpp
tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp
tests/auto/qsqldriver/qsqldriver.pro
tests/auto/qsqlquery/qsqlquery.pro
tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
tests/auto/qsqltablemodel/qsqltablemodel.pro
tests/auto/qsqlthread/qsqlthread.pro
tests/auto/qstatemachine/tst_qstatemachine.cpp
tests/auto/qtcpsocket/tst_qtcpsocket.cpp
Diffstat (limited to 'tests/auto/qstatemachine')
-rw-r--r-- | tests/auto/qstatemachine/tst_qstatemachine.cpp | 182 |
1 files changed, 91 insertions, 91 deletions
diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp index 97115bb..41347eb 100644 --- a/tests/auto/qstatemachine/tst_qstatemachine.cpp +++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp @@ -129,7 +129,7 @@ private slots: void transitionToRootState(); void transitionFromRootState(); void transitionEntersParent(); - + void defaultErrorState(); void customGlobalErrorState(); void customLocalErrorStateInBrokenState(); @@ -148,16 +148,16 @@ private slots: void customErrorStateNotInGraph(); void transitionToStateNotInGraph(); void restoreProperties(); - + void defaultGlobalRestorePolicy(); void globalRestorePolicySetToRestore(); void globalRestorePolicySetToDoNotRestore(); void noInitialStateForInitialState(); - + //void restorePolicyNotInherited(); //void mixedRestoreProperties(); - //void setRestorePolicyToDoNotRestore(); + //void setRestorePolicyToDoNotRestore(); //void setGlobalRestorePolicyToGlobalRestore(); //void restorePolicyOnChildState(); @@ -186,7 +186,7 @@ private slots: // void removeDefaultAnimationForSource(); // void removeDefaultAnimationForTarget(); // void overrideDefaultAnimationWithSource(); -// void overrideDefaultAnimationWithTarget(); +// void overrideDefaultAnimationWithTarget(); // void overrideDefaultSourceAnimationWithSpecific(); // void overrideDefaultTargetAnimationWithSpecific(); // void overrideDefaultTargetAnimationWithSource(); @@ -393,14 +393,14 @@ void tst_QStateMachine::defaultErrorState() class CustomErrorState: public QState { public: - CustomErrorState(QStateMachine *machine, QState *parent = 0) + CustomErrorState(QStateMachine *machine, QState *parent = 0) : QState(parent), error(QStateMachine::NoError), m_machine(machine) { } void onEntry(QEvent *) { - error = m_machine->error(); + error = m_machine->error(); errorString = m_machine->errorString(); } @@ -444,7 +444,7 @@ void tst_QStateMachine::customGlobalErrorState() QVERIFY(machine.configuration().contains(initialState)); QCoreApplication::processEvents(); - + QCOMPARE(machine.isRunning(), true); QCOMPARE(machine.configuration().count(), 1); QVERIFY(machine.configuration().contains(customErrorState)); @@ -455,7 +455,7 @@ void tst_QStateMachine::customGlobalErrorState() } void tst_QStateMachine::customLocalErrorStateInBrokenState() -{ +{ QStateMachine machine; CustomErrorState *customErrorState = new CustomErrorState(&machine); machine.addState(customErrorState); @@ -467,15 +467,15 @@ void tst_QStateMachine::customLocalErrorStateInBrokenState() QState *brokenState = new QState(); brokenState->setObjectName("brokenState"); - machine.addState(brokenState); - brokenState->setErrorState(customErrorState); + machine.addState(brokenState); + brokenState->setErrorState(customErrorState); QState *childState = new QState(brokenState); childState->setObjectName("childState"); initialState->addTransition(new EventTransition(QEvent::Type(QEvent::User + 1), brokenState)); - machine.start(); + machine.start(); QCoreApplication::processEvents(); machine.postEvent(new QEvent(QEvent::Type(QEvent::User + 1))); @@ -495,15 +495,15 @@ void tst_QStateMachine::customLocalErrorStateInOtherState() QState *initialState = new QState(); initialState->setObjectName("initialState"); - QTest::ignoreMessage(QtWarningMsg, "QState::setErrorState: error state cannot belong to a different state machine"); + QTest::ignoreMessage(QtWarningMsg, "QState::setErrorState: error state cannot belong to a different state machine"); initialState->setErrorState(customErrorState); machine.addState(initialState); machine.setInitialState(initialState); QState *brokenState = new QState(); brokenState->setObjectName("brokenState"); - - machine.addState(brokenState); + + machine.addState(brokenState); QState *childState = new QState(brokenState); childState->setObjectName("childState"); @@ -534,7 +534,7 @@ void tst_QStateMachine::customLocalErrorStateInParentOfBrokenState() QState *parentOfBrokenState = new QState(); machine.addState(parentOfBrokenState); parentOfBrokenState->setObjectName("parentOfBrokenState"); - parentOfBrokenState->setErrorState(customErrorState); + parentOfBrokenState->setErrorState(customErrorState); QState *brokenState = new QState(parentOfBrokenState); brokenState->setObjectName("brokenState"); @@ -574,7 +574,7 @@ void tst_QStateMachine::customLocalErrorStateOverridesParent() machine.addState(parentOfBrokenState); parentOfBrokenState->setObjectName("parentOfBrokenState"); parentOfBrokenState->setErrorState(customErrorStateForParent); - + QState *brokenState = new QState(parentOfBrokenState); brokenState->setObjectName("brokenState"); brokenState->setErrorState(customErrorStateForBrokenState); @@ -613,10 +613,10 @@ void tst_QStateMachine::errorStateHasChildren() QState *initialState = new QState(); initialState->setObjectName("initialState"); machine.addState(initialState); - machine.setInitialState(initialState); + machine.setInitialState(initialState); QState *brokenState = new QState(); - brokenState->setObjectName("brokenState"); + brokenState->setObjectName("brokenState"); machine.addState(brokenState); QState *childState = new QState(brokenState); @@ -633,7 +633,7 @@ void tst_QStateMachine::errorStateHasChildren() QCOMPARE(machine.isRunning(), true); QCOMPARE(machine.configuration().count(), 2); QVERIFY(machine.configuration().contains(customErrorState)); - QVERIFY(machine.configuration().contains(childOfErrorState)); + QVERIFY(machine.configuration().contains(childOfErrorState)); } @@ -652,10 +652,10 @@ void tst_QStateMachine::errorStateHasErrors() QState *initialState = new QState(); initialState->setObjectName("initialState"); machine.addState(initialState); - machine.setInitialState(initialState); + machine.setInitialState(initialState); QState *brokenState = new QState(); - brokenState->setObjectName("brokenState"); + brokenState->setObjectName("brokenState"); machine.addState(brokenState); QState *childState = new QState(brokenState); @@ -684,10 +684,10 @@ void tst_QStateMachine::errorStateIsRootState() QState *initialState = new QState(); initialState->setObjectName("initialState"); machine.addState(initialState); - machine.setInitialState(initialState); - + machine.setInitialState(initialState); + QState *brokenState = new QState(); - brokenState->setObjectName("brokenState"); + brokenState->setObjectName("brokenState"); machine.addState(brokenState); QState *childState = new QState(brokenState); @@ -724,7 +724,7 @@ void tst_QStateMachine::errorStateEntersParentFirst() QState *grandParent = new QState(greatGrandParent); grandParent->setObjectName("grandParent"); - grandParent->assignProperty(entryController, "grandParentEntered", true); + grandParent->assignProperty(entryController, "grandParentEntered", true); QState *parent = new QState(grandParent); parent->setObjectName("parent"); @@ -739,7 +739,7 @@ void tst_QStateMachine::errorStateEntersParentFirst() initialStateOfGreatGrandParent->setObjectName("initialStateOfGreatGrandParent"); greatGrandParent->setInitialState(initialStateOfGreatGrandParent); - QState *brokenState = new QState(greatGrandParent); + QState *brokenState = new QState(greatGrandParent); brokenState->setObjectName("brokenState"); QState *childState = new QState(brokenState); @@ -805,9 +805,9 @@ void tst_QStateMachine::customErrorStateIsNull() void tst_QStateMachine::clearError() { - QStateMachine machine; + QStateMachine machine; machine.setErrorState(new QState(&machine)); // avoid warnings - + QState *brokenState = new QState(&machine); brokenState->setObjectName("brokenState"); machine.setInitialState(brokenState); @@ -840,10 +840,10 @@ void tst_QStateMachine::historyStateAsInitialState() QHistoryState *s2h = new QHistoryState(s2); s2->setInitialState(s2h); - + QState *s21 = new QState(s2); s2h->setDefaultState(s21); - + s1->addTransition(new EventTransition(QEvent::User, s2)); machine.start(); @@ -898,17 +898,17 @@ void tst_QStateMachine::brokenStateIsNeverEntered() entryController->setProperty("childStateEntered", false); entryController->setProperty("errorStateEntered", false); - QState *initialState = new QState(&machine); + QState *initialState = new QState(&machine); machine.setInitialState(initialState); QState *errorState = new QState(&machine); errorState->assignProperty(entryController, "errorStateEntered", true); - machine.setErrorState(errorState); + machine.setErrorState(errorState); QState *brokenState = new QState(&machine); brokenState->assignProperty(entryController, "brokenStateEntered", true); brokenState->setObjectName("brokenState"); - + QState *childState = new QState(brokenState); childState->assignProperty(entryController, "childStateEntered", true); @@ -927,7 +927,7 @@ void tst_QStateMachine::brokenStateIsNeverEntered() void tst_QStateMachine::transitionToStateNotInGraph() { - QStateMachine machine; + QStateMachine machine; QState *initialState = new QState(&machine); initialState->setObjectName("initialState"); @@ -1036,7 +1036,7 @@ void tst_QStateMachine::addAndRemoveState() #ifdef QT_BUILD_INTERNAL QStateMachine machine; QStatePrivate *root_d = QStatePrivate::get(&machine); - QCOMPARE(root_d->childStates().size(), 0); + QCOMPARE(root_d->childStates().size(), 0); QTest::ignoreMessage(QtWarningMsg, "QStateMachine::addState: cannot add null state"); machine.addState(0); @@ -1520,7 +1520,7 @@ public: { setTargetState(target); } protected: - virtual bool eventTest(QEvent *e) + virtual bool eventTest(QEvent *e) { if (e->type() != QEvent::Type(QEvent::User+2)) return false; @@ -2401,7 +2401,7 @@ void tst_QStateMachine::targetStateWithNoParent() machine.start(); QTest::ignoreMessage(QtWarningMsg, "Unrecoverable error detected in running state machine: No common ancestor for targets and source of transition from state 's1'"); QTRY_COMPARE(startedSpy.count(), 1); - QCOMPARE(machine.isRunning(), false); + QCOMPARE(machine.isRunning(), false); QCOMPARE(stoppedSpy.count(), 1); QCOMPARE(finishedSpy.count(), 0); QCOMPARE(machine.error(), QStateMachine::NoCommonAncestorForTransitionError); @@ -2421,7 +2421,7 @@ void tst_QStateMachine::targetStateDeleted() void tst_QStateMachine::defaultGlobalRestorePolicy() { - QStateMachine machine; + QStateMachine machine; QObject *propertyHolder = new QObject(&machine); propertyHolder->setProperty("a", 1); @@ -2441,7 +2441,7 @@ void tst_QStateMachine::defaultGlobalRestorePolicy() machine.setInitialState(s1); machine.start(); QCoreApplication::processEvents(); - + QCOMPARE(propertyHolder->property("a").toInt(), 3); QCOMPARE(propertyHolder->property("b").toInt(), 2); @@ -2455,7 +2455,7 @@ void tst_QStateMachine::defaultGlobalRestorePolicy() QCoreApplication::processEvents(); QCOMPARE(propertyHolder->property("a").toInt(), 3); - QCOMPARE(propertyHolder->property("b").toInt(), 4); + QCOMPARE(propertyHolder->property("b").toInt(), 4); } void tst_QStateMachine::noInitialStateForInitialState() @@ -2481,7 +2481,7 @@ void tst_QStateMachine::noInitialStateForInitialState() /* void tst_QStateMachine::restorePolicyNotInherited() { - QStateMachine machine; + QStateMachine machine; QObject *propertyHolder = new QObject(); propertyHolder->setProperty("a", 1); @@ -2509,7 +2509,7 @@ void tst_QStateMachine::restorePolicyNotInherited() machine.setInitialState(parentState); machine.start(); QCoreApplication::processEvents(); - + QCOMPARE(propertyHolder->property("a").toInt(), 3); QCOMPARE(propertyHolder->property("b").toInt(), 2); @@ -2523,7 +2523,7 @@ void tst_QStateMachine::restorePolicyNotInherited() QCoreApplication::processEvents(); QCOMPARE(propertyHolder->property("a").toInt(), 3); - QCOMPARE(propertyHolder->property("b").toInt(), 4); + QCOMPARE(propertyHolder->property("b").toInt(), 4); }*/ @@ -2550,7 +2550,7 @@ void tst_QStateMachine::globalRestorePolicySetToDoNotRestore() machine.setInitialState(s1); machine.start(); QCoreApplication::processEvents(); - + QCOMPARE(propertyHolder->property("a").toInt(), 3); QCOMPARE(propertyHolder->property("b").toInt(), 2); @@ -2564,7 +2564,7 @@ void tst_QStateMachine::globalRestorePolicySetToDoNotRestore() QCoreApplication::processEvents(); QCOMPARE(propertyHolder->property("a").toInt(), 3); - QCOMPARE(propertyHolder->property("b").toInt(), 4); + QCOMPARE(propertyHolder->property("b").toInt(), 4); } /* @@ -2670,7 +2670,7 @@ void tst_QStateMachine::restorePolicyOnChildState() machine.setInitialState(parentState); machine.start(); QCoreApplication::processEvents(); - + QCOMPARE(propertyHolder->property("a").toInt(), 3); QCOMPARE(propertyHolder->property("b").toInt(), 2); @@ -2684,13 +2684,13 @@ void tst_QStateMachine::restorePolicyOnChildState() QCoreApplication::processEvents(); QCOMPARE(propertyHolder->property("a").toInt(), 1); - QCOMPARE(propertyHolder->property("b").toInt(), 2); + QCOMPARE(propertyHolder->property("b").toInt(), 2); } */ void tst_QStateMachine::globalRestorePolicySetToRestore() { - QStateMachine machine; + QStateMachine machine; machine.setGlobalRestorePolicy(QStateMachine::RestoreProperties); QObject *propertyHolder = new QObject(&machine); @@ -2711,7 +2711,7 @@ void tst_QStateMachine::globalRestorePolicySetToRestore() machine.setInitialState(s1); machine.start(); QCoreApplication::processEvents(); - + QCOMPARE(propertyHolder->property("a").toInt(), 3); QCOMPARE(propertyHolder->property("b").toInt(), 2); @@ -2725,16 +2725,16 @@ void tst_QStateMachine::globalRestorePolicySetToRestore() QCoreApplication::processEvents(); QCOMPARE(propertyHolder->property("a").toInt(), 1); - QCOMPARE(propertyHolder->property("b").toInt(), 2); + QCOMPARE(propertyHolder->property("b").toInt(), 2); } /* void tst_QStateMachine::mixedRestoreProperties() { - QStateMachine machine; + QStateMachine machine; QObject *propertyHolder = new QObject(); - propertyHolder->setProperty("a", 1); + propertyHolder->setProperty("a", 1); QState *s1 = new QState(&machine); s1->setRestorePolicy(QState::RestoreProperties); @@ -2761,7 +2761,7 @@ void tst_QStateMachine::mixedRestoreProperties() machine.setInitialState(s1); machine.start(); QCoreApplication::processEvents(); - + // Enter s1, save current QCOMPARE(propertyHolder->property("a").toInt(), 3); @@ -2837,7 +2837,7 @@ void tst_QStateMachine::simpleAnimation() QCOREAPPLICATION_EXEC(5000); QVERIFY(machine.configuration().contains(s3)); - QCOMPARE(object->property("fooBar").toDouble(), 2.0); + QCOMPARE(object->property("fooBar").toDouble(), 2.0); } class SlotCalledCounter: public QObject @@ -2870,7 +2870,7 @@ void tst_QStateMachine::twoAnimations() animationBar->setDuration(900); SlotCalledCounter counter; - connect(animationFoo, SIGNAL(finished()), &counter, SLOT(slot())); + connect(animationFoo, SIGNAL(finished()), &counter, SLOT(slot())); connect(animationBar, SIGNAL(finished()), &counter, SLOT(slot())); EventTransition *et = new EventTransition(QEvent::User, s2); @@ -2892,7 +2892,7 @@ void tst_QStateMachine::twoAnimations() QVERIFY(machine.configuration().contains(s3)); QCOMPARE(object->property("foo").toDouble(), 2.0); QCOMPARE(object->property("bar").toDouble(), 10.0); - + QCOMPARE(counter.counter, 2); } @@ -3005,12 +3005,12 @@ void tst_QStateMachine::nestedTargetStateForAnimation() QState *s2Child2 = new QState(s2); s2Child2->assignProperty(object, "bar", 11.0); QAbstractTransition *at = s2Child->addTransition(new EventTransition(QEvent::User, s2Child2)); - + QPropertyAnimation *animation = new QPropertyAnimation(object, "bar", s2); animation->setDuration(2000); connect(animation, SIGNAL(finished()), &counter, SLOT(slot())); at->addAnimation(animation); - + at = s1->addTransition(new EventTransition(QEvent::User, s2)); animation = new QPropertyAnimation(object, "foo", s2); @@ -3020,7 +3020,7 @@ void tst_QStateMachine::nestedTargetStateForAnimation() animation = new QPropertyAnimation(object, "bar", s2); connect(animation, SIGNAL(finished()), &counter, SLOT(slot())); at->addAnimation(animation); - + QState *s3 = new QState(&machine); s2->addTransition(s2Child, SIGNAL(polished()), s3); @@ -3062,7 +3062,7 @@ void tst_QStateMachine::animatedGlobalRestoreProperty() QPropertyAnimation *pa = new QPropertyAnimation(object, "foo", s2); connect(pa, SIGNAL(finished()), &counter, SLOT(slot())); at->addAnimation(pa); - + at = s2->addTransition(pa, SIGNAL(finished()), s3); pa = new QPropertyAnimation(object, "foo", s3); connect(pa, SIGNAL(finished()), &counter, SLOT(slot())); @@ -3104,7 +3104,7 @@ void tst_QStateMachine::specificTargetValueOfAnimation() QState *s3 = new QState(&machine); QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit())); - s2->addTransition(anim, SIGNAL(finished()), s3); + s2->addTransition(anim, SIGNAL(finished()), s3); machine.setInitialState(s1); machine.start(); @@ -3134,7 +3134,7 @@ void tst_QStateMachine::addDefaultAnimation() QState *s3 = new QState(&machine); QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit())); - + s1->addTransition(new EventTransition(QEvent::User, s2)); QPropertyAnimation *pa = new QPropertyAnimation(object, "foo", &machine); @@ -3171,7 +3171,7 @@ void tst_QStateMachine::addDefaultAnimationWithUnusedAnimation() QState *s3 = new QState(&machine); QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit())); - + s1->addTransition(new EventTransition(QEvent::User, s2)); QPropertyAnimation *pa = new QPropertyAnimation(object, "foo", &machine); @@ -3216,7 +3216,7 @@ void tst_QStateMachine::removeDefaultAnimation() QCOMPARE(machine.defaultAnimations().size(), 0); machine.addDefaultAnimation(anim); - + QPropertyAnimation *anim2 = new QPropertyAnimation(&propertyHolder, "foo"); machine.addDefaultAnimation(anim2); @@ -3255,8 +3255,8 @@ void tst_QStateMachine::overrideDefaultAnimationWithSpecific() QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit())); QAbstractTransition *at = s1->addTransition(new EventTransition(QEvent::User, s2)); - - QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo"); + + QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo"); connect(defaultAnimation, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)), &counter, SLOT(slot())); QPropertyAnimation *moreSpecificAnimation = new QPropertyAnimation(object, "foo"); @@ -3294,7 +3294,7 @@ void tst_QStateMachine::addDefaultAnimationForSource() QState *s3 = new QState(&machine); QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit())); - + s1->addTransition(new EventTransition(QEvent::User, s2)); QPropertyAnimation *pa = new QPropertyAnimation(object, "foo", &machine); @@ -3326,7 +3326,7 @@ void tst_QStateMachine::addDefaultAnimationForTarget() QState *s3 = new QState(&machine); QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit())); - + s1->addTransition(new EventTransition(QEvent::User, s2)); QPropertyAnimation *pa = new QPropertyAnimation(object, "foo", &machine); @@ -3371,7 +3371,7 @@ void tst_QStateMachine::removeDefaultAnimationForSource() QCOMPARE(machine.defaultAnimationsForSourceState(&machine).size(), 0); machine.addDefaultAnimationForSourceState(&machine, anim); - + QPropertyAnimation *anim2 = new QPropertyAnimation(this, "foo"); machine.addDefaultAnimationForSourceState(&machine, anim2); @@ -3415,7 +3415,7 @@ void tst_QStateMachine::removeDefaultAnimationForTarget() QCOMPARE(machine.defaultAnimationsForTargetState(&machine).size(), 0); machine.addDefaultAnimationForTargetState(&machine, anim); - + QPropertyAnimation *anim2 = new QPropertyAnimation(this, "foo"); machine.addDefaultAnimationForTargetState(&machine, anim2); @@ -3450,9 +3450,9 @@ void tst_QStateMachine::overrideDefaultAnimationWithSource() QState *s3 = new QState(&machine); QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit())); - s1->addTransition(new EventTransition(QEvent::User, s2)); - - QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo"); + s1->addTransition(new EventTransition(QEvent::User, s2)); + + QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo"); connect(defaultAnimation, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)), &counter, SLOT(slot())); QPropertyAnimation *moreSpecificAnimation = new QPropertyAnimation(object, "foo"); @@ -3490,9 +3490,9 @@ void tst_QStateMachine::overrideDefaultAnimationWithTarget() QState *s3 = new QState(&machine); QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit())); - s1->addTransition(new EventTransition(QEvent::User, s2)); - - QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo"); + s1->addTransition(new EventTransition(QEvent::User, s2)); + + QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo"); connect(defaultAnimation, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)), &counter, SLOT(slot())); QPropertyAnimation *moreSpecificAnimation = new QPropertyAnimation(object, "foo"); @@ -3532,8 +3532,8 @@ void tst_QStateMachine::overrideDefaultSourceAnimationWithSpecific() QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit())); QAbstractTransition *at = s1->addTransition(new EventTransition(QEvent::User, s2)); - - QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo"); + + QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo"); connect(defaultAnimation, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)), &counter, SLOT(slot())); QPropertyAnimation *moreSpecificAnimation = new QPropertyAnimation(object, "foo"); @@ -3572,8 +3572,8 @@ void tst_QStateMachine::overrideDefaultTargetAnimationWithSpecific() QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit())); QAbstractTransition *at = s1->addTransition(new EventTransition(QEvent::User, s2)); - - QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo"); + + QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo"); connect(defaultAnimation, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)), &counter, SLOT(slot())); QPropertyAnimation *moreSpecificAnimation = new QPropertyAnimation(object, "foo"); @@ -3612,8 +3612,8 @@ void tst_QStateMachine::overrideDefaultTargetAnimationWithSource() QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit())); s1->addTransition(new EventTransition(QEvent::User, s2)); - - QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo"); + + QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo"); connect(defaultAnimation, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)), &counter, SLOT(slot())); QPropertyAnimation *moreSpecificAnimation = new QPropertyAnimation(object, "foo"); @@ -3663,7 +3663,7 @@ void tst_QStateMachine::parallelStateAssignmentsDone() QCOMPARE(propertyHolder->property("foo").toInt(), 123); QCOMPARE(propertyHolder->property("bar").toInt(), 456); QCOMPARE(propertyHolder->property("zoot").toInt(), 789); - + machine.postEvent(new QEvent(QEvent::User)); QCoreApplication::processEvents(); @@ -3675,13 +3675,13 @@ void tst_QStateMachine::parallelStateAssignmentsDone() void tst_QStateMachine::transitionsFromParallelStateWithNoChildren() { QStateMachine machine; - + QState *parallelState = new QState(QState::ParallelStates, &machine); machine.setInitialState(parallelState); - QState *s1 = new QState(&machine); + QState *s1 = new QState(&machine); parallelState->addTransition(new EventTransition(QEvent::User, s1)); - + machine.start(); QCoreApplication::processEvents(); @@ -3712,7 +3712,7 @@ void tst_QStateMachine::parallelStateTransition() QState *s2InitialChild = new QState(s2); s2->setInitialState(s2InitialChild); - QState *s1OtherChild = new QState(s1); + QState *s1OtherChild = new QState(s1); s1->addTransition(new EventTransition(QEvent::User, s1OtherChild)); @@ -3732,12 +3732,12 @@ void tst_QStateMachine::parallelStateTransition() QVERIFY(machine.configuration().contains(parallelState)); QVERIFY(machine.configuration().contains(s1)); - + QVERIFY(machine.configuration().contains(s2)); QVERIFY(machine.configuration().contains(s1OtherChild)); QVERIFY(machine.configuration().contains(s2InitialChild)); QCOMPARE(machine.configuration().size(), 5); - + } void tst_QStateMachine::nestedRestoreProperties() @@ -3808,7 +3808,7 @@ void tst_QStateMachine::nestedRestoreProperties2() s2->assignProperty(propertyHolder, "foo", 3); QState *s21 = new QState(s2); - s21->assignProperty(propertyHolder, "bar", 4); + s21->assignProperty(propertyHolder, "bar", 4); s2->setInitialState(s21); QState *s22 = new QState(s2); |