summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-08-11 13:06:56 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-08-11 13:06:56 (GMT)
commit05b9ac1574ec8333d4b156973766d995b6a9b1e4 (patch)
tree6b935ba249a1677cd7a7ae348bf83d1476971abc
parent8f10c91b2fc5ccc2ffaca64db2fbb7e009bd5ae4 (diff)
downloadQt-05b9ac1574ec8333d4b156973766d995b6a9b1e4.zip
Qt-05b9ac1574ec8333d4b156973766d995b6a9b1e4.tar.gz
Qt-05b9ac1574ec8333d4b156973766d995b6a9b1e4.tar.bz2
Fixed qstatemachine autotest compilaton for Symbian OS.
Apparently Nokia X86 compiler is not able to use templated qCompare when given arguments have different different type but same base class. This error should be isolated and reported to Nokia X86 team. See task: 259508
-rw-r--r--tests/auto/qstatemachine/tst_qstatemachine.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp
index 41347eb..3add362 100644
--- a/tests/auto/qstatemachine/tst_qstatemachine.cpp
+++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp
@@ -274,7 +274,7 @@ void tst_QStateMachine::transitionToRootState()
QAbstractTransition *trans = initialState->addTransition(new EventTransition(QEvent::User, &machine));
QVERIFY(trans != 0);
QCOMPARE(trans->sourceState(), initialState);
- QCOMPARE(trans->targetState(), &machine);
+ QCOMPARE(trans->targetState(), static_cast<QAbstractState *>(&machine));
machine.start();
QCoreApplication::processEvents();
@@ -295,9 +295,9 @@ void tst_QStateMachine::transitionFromRootState()
QState *root = &machine;
QState *s1 = new QState(root);
EventTransition *trans = new EventTransition(QEvent::User, s1);
- QCOMPARE(root->addTransition(trans), trans);
+ QCOMPARE(root->addTransition(trans), static_cast<QAbstractTransition *>(trans));
QCOMPARE(trans->sourceState(), root);
- QCOMPARE(trans->targetState(), s1);
+ QCOMPARE(trans->targetState(), static_cast<QAbstractState *>(s1));
}
void tst_QStateMachine::transitionEntersParent()
@@ -1024,11 +1024,11 @@ void tst_QStateMachine::rootState()
QCOMPARE(machine.machine(), (QStateMachine*)0);
QState *s1 = new QState(&machine);
- QCOMPARE(s1->parentState(), &machine);
+ QCOMPARE(s1->parentState(), static_cast<QState*>(&machine));
QState *s2 = new QState();
s2->setParent(&machine);
- QCOMPARE(s2->parentState(), &machine);
+ QCOMPARE(s2->parentState(), static_cast<QState*>(&machine));
}
void tst_QStateMachine::addAndRemoveState()
@@ -1045,8 +1045,8 @@ void tst_QStateMachine::addAndRemoveState()
QCOMPARE(s1->parentState(), (QState*)0);
QCOMPARE(s1->machine(), (QStateMachine*)0);
machine.addState(s1);
- QCOMPARE(s1->machine(), &machine);
- QCOMPARE(s1->parentState(), &machine);
+ QCOMPARE(s1->machine(), static_cast<QStateMachine*>(&machine));
+ QCOMPARE(s1->parentState(), static_cast<QState*>(&machine));
QCOMPARE(root_d->childStates().size(), 1);
QCOMPARE(root_d->childStates().at(0), (QAbstractState*)s1);
@@ -1056,7 +1056,7 @@ void tst_QStateMachine::addAndRemoveState()
QState *s2 = new QState();
QCOMPARE(s2->parentState(), (QState*)0);
machine.addState(s2);
- QCOMPARE(s2->parentState(), &machine);
+ QCOMPARE(s2->parentState(), static_cast<QState*>(&machine));
QCOMPARE(root_d->childStates().size(), 2);
QCOMPARE(root_d->childStates().at(0), (QAbstractState*)s1);
QCOMPARE(root_d->childStates().at(1), (QAbstractState*)s2);