diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-14 06:16:07 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-14 06:16:59 (GMT) |
commit | e52a73d8c74576e267dcc59d42247bd14131daaf (patch) | |
tree | f23bd7a9cc5d6163a9807f43237c21c7f644fe50 /tests/auto | |
parent | 5a8b5b892441a65319e39c1a8f305cf0b49edf17 (diff) | |
download | Qt-e52a73d8c74576e267dcc59d42247bd14131daaf.zip Qt-e52a73d8c74576e267dcc59d42247bd14131daaf.tar.gz Qt-e52a73d8c74576e267dcc59d42247bd14131daaf.tar.bz2 |
Reduce warnings at shutdown
QTBUG-9799
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml | 9 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 18 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml b/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml new file mode 100644 index 0000000..a52c772 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml @@ -0,0 +1,9 @@ +import Qt 4.6 + +Item { + id: root + + property int childrenCount: root.children.length + + Item {} +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index c648de4..12a065e 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -142,6 +142,7 @@ private slots: void libraryScriptAssert(); void variantsAssignedUndefined(); void qtbug_9792(); + void noSpuriousWarningsAtShutdown(); void callQtInvokables(); private: @@ -2238,6 +2239,23 @@ void tst_qdeclarativeecmascript::qtbug_9792() delete object; } +// Test that we shut down without stupid warnings +void tst_qdeclarativeecmascript::noSpuriousWarningsAtShutdown() +{ + QDeclarativeComponent component(&engine, TEST_FILE("noSpuriousWarningsAtShutdown.qml")); + + QObject *o = component.create(); + + transientErrorsMsgCount = 0; + QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler); + + delete o; + + qInstallMsgHandler(old); + + QCOMPARE(transientErrorsMsgCount, 0); +} + QTEST_MAIN(tst_qdeclarativeecmascript) #include "tst_qdeclarativeecmascript.moc" |