diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-04-14 03:05:41 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-04-14 03:05:41 (GMT) |
commit | f19b9cbdf824b8943acc785c50d13fade415bd33 (patch) | |
tree | 1d5fe72fe4a50068287c3c1d29a1a17db6af88b7 /tests | |
parent | b24a4c0b75f5d393ca673942b68a12f02ed476e8 (diff) | |
parent | 2fe3de8526336cf59c23574fc48c61cd9ce2d9f6 (diff) | |
download | Qt-f19b9cbdf824b8943acc785c50d13fade415bd33.zip Qt-f19b9cbdf824b8943acc785c50d13fade415bd33.tar.gz Qt-f19b9cbdf824b8943acc785c50d13fade415bd33.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index c9fb116..c648de4 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -141,6 +141,7 @@ private slots: void deletedEngine(); void libraryScriptAssert(); void variantsAssignedUndefined(); + void qtbug_9792(); void callQtInvokables(); private: @@ -2211,6 +2212,32 @@ void tst_qdeclarativeecmascript::variantsAssignedUndefined() delete object; } +void tst_qdeclarativeecmascript::qtbug_9792() +{ + QDeclarativeComponent component(&engine, TEST_FILE("qtbug_9792.qml")); + + QDeclarativeContext *context = new QDeclarativeContext(engine.rootContext()); + + MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create(context)); + QVERIFY(object != 0); + + QTest::ignoreMessage(QtDebugMsg, "Hello world!"); + object->basicSignal(); + + delete context; + + transientErrorsMsgCount = 0; + QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler); + + object->basicSignal(); + + qInstallMsgHandler(old); + + QCOMPARE(transientErrorsMsgCount, 0); + + delete object; +} + QTEST_MAIN(tst_qdeclarativeecmascript) #include "tst_qdeclarativeecmascript.moc" |