summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp4
-rw-r--r--tests/auto/qstatemachine/tst_qstatemachine.cpp16
-rw-r--r--tests/auto/qvariant/tst_qvariant.cpp3
3 files changed, 11 insertions, 12 deletions
diff --git a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
index 932803a..886c70b 100644
--- a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
+++ b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
@@ -1844,7 +1844,6 @@ void tst_QScriptEngineAgent::eventOrder_functions()
QCOMPARE(spy->at(37).type, ScriptEngineEvent::ContextPop);
// exception
QCOMPARE(spy->at(38).type, ScriptEngineEvent::ExceptionThrow);
- QEXPECT_FAIL("","New backend propably gives bad script id for exceptions", Abort);
QCOMPARE(spy->at(38).scriptId, spy->at(21).scriptId);
QVERIFY(!spy->at(38).hasExceptionHandler);
// bar() exit
@@ -1921,7 +1920,6 @@ void tst_QScriptEngineAgent::eventOrder_signalsHandling()
emit testSignal(123);
- QEXPECT_FAIL("","Signals events problem", Abort);
QCOMPARE(spy->count(), 14);
// new context
QCOMPARE(spy->at(4).type, ScriptEngineEvent::ContextPush);
@@ -2048,7 +2046,7 @@ void tst_QScriptEngineAgent::syntaxError()
spy->clear();
eng.evaluate("{");
- //QCOMPARE(spy->count(), 9);
+ QCOMPARE(spy->count(), 9);
QCOMPARE(spy->at(i).type, ScriptEngineEvent::ScriptLoad);
QVERIFY(spy->at(i).scriptId != -1);
diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp
index 5e2064b..20e69ce 100644
--- a/tests/auto/qstatemachine/tst_qstatemachine.cpp
+++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp
@@ -2066,7 +2066,7 @@ void tst_QStateMachine::eventTransitions()
QPushButton button2;
machine.start();
QCoreApplication::processEvents();
- trans->setEventObject(&button2);
+ trans->setEventSource(&button2);
QTest::mousePress(&button2, Qt::LeftButton);
QTRY_COMPARE(finishedSpy.count(), 4);
}
@@ -2078,16 +2078,16 @@ void tst_QStateMachine::eventTransitions()
QEventTransition *trans;
if (x == 0) {
trans = new QEventTransition();
- QCOMPARE(trans->eventObject(), (QObject*)0);
+ QCOMPARE(trans->eventSource(), (QObject*)0);
QCOMPARE(trans->eventType(), QEvent::None);
- trans->setEventObject(&button);
+ trans->setEventSource(&button);
trans->setEventType(QEvent::MouseButtonPress);
trans->setTargetState(s1);
} else if (x == 1) {
trans = new QEventTransition(&button, QEvent::MouseButtonPress);
trans->setTargetState(s1);
}
- QCOMPARE(trans->eventObject(), (QObject*)&button);
+ QCOMPARE(trans->eventSource(), (QObject*)&button);
QCOMPARE(trans->eventType(), QEvent::MouseButtonPress);
QCOMPARE(trans->targetState(), (QAbstractState*)s1);
s0->addTransition(trans);
@@ -2108,10 +2108,10 @@ void tst_QStateMachine::eventTransitions()
QFinalState *s1 = new QFinalState(&machine);
QMouseEventTransition *trans = new QMouseEventTransition();
- QCOMPARE(trans->eventObject(), (QObject*)0);
+ QCOMPARE(trans->eventSource(), (QObject*)0);
QCOMPARE(trans->eventType(), QEvent::None);
QCOMPARE(trans->button(), Qt::NoButton);
- trans->setEventObject(&button);
+ trans->setEventSource(&button);
trans->setEventType(QEvent::MouseButtonPress);
trans->setButton(Qt::LeftButton);
trans->setTargetState(s1);
@@ -2155,10 +2155,10 @@ void tst_QStateMachine::eventTransitions()
QFinalState *s1 = new QFinalState(&machine);
QKeyEventTransition *trans = new QKeyEventTransition();
- QCOMPARE(trans->eventObject(), (QObject*)0);
+ QCOMPARE(trans->eventSource(), (QObject*)0);
QCOMPARE(trans->eventType(), QEvent::None);
QCOMPARE(trans->key(), 0);
- trans->setEventObject(&button);
+ trans->setEventSource(&button);
trans->setEventType(QEvent::KeyPress);
trans->setKey(Qt::Key_A);
trans->setTargetState(s1);
diff --git a/tests/auto/qvariant/tst_qvariant.cpp b/tests/auto/qvariant/tst_qvariant.cpp
index 729e29b..fc977bc 100644
--- a/tests/auto/qvariant/tst_qvariant.cpp
+++ b/tests/auto/qvariant/tst_qvariant.cpp
@@ -2623,7 +2623,7 @@ void tst_QVariant::qvariant_cast_QObject_data() {
QTest::addColumn<QVariant>("data");
QTest::addColumn<bool>("success");
- QTest::newRow("from QObject") << QVariant(QMetaType::QObjectStar, new QObject) << true;
+ QTest::newRow("from QObject") << QVariant(QMetaType::QObjectStar, new QObject(this)) << true;
QTest::newRow("from String") << QVariant(QLatin1String("1, 2, 3")) << false;
QTest::newRow("from int") << QVariant((int) 123) << false;
}
@@ -2748,6 +2748,7 @@ void tst_QVariant::dataStar() const
v2 = qVariantFromValue(p1);
QVERIFY(v1 == v2);
+ delete p1;
}
void tst_QVariant::canConvertQStringList() const