diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-01 17:15:00 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-01 17:15:00 (GMT) |
commit | 936c0246881b9a2add2fd4bcc07735d5b93f490e (patch) | |
tree | 117366acf5566bbc4cb49aee61e3dea0d79df11c /tests | |
parent | 2d719ce634efa5e0abfb5d76eb516133753b5a62 (diff) | |
parent | 83c37c2cdf7adf2604e1e6012a9e0e6e67d97d6b (diff) | |
download | Qt-936c0246881b9a2add2fd4bcc07735d5b93f490e.zip Qt-936c0246881b9a2add2fd4bcc07735d5b93f490e.tar.gz Qt-936c0246881b9a2add2fd4bcc07735d5b93f490e.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
removed dead code
QMetaObject::invokeMethod: print a warning if the method is not found.
Fixed qDrawPixmaps() to draw on integer coordinates on Mac OS X.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qmetaobject/tst_qmetaobject.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qmetaobject/tst_qmetaobject.cpp b/tests/auto/qmetaobject/tst_qmetaobject.cpp index 15b6204..bd54975 100644 --- a/tests/auto/qmetaobject/tst_qmetaobject.cpp +++ b/tests/auto/qmetaobject/tst_qmetaobject.cpp @@ -513,6 +513,19 @@ void tst_QMetaObject::invokeMetaMember() QVERIFY(QMetaObject::invokeMethod(&obj, "sig1", Q_RETURN_ARG(QString, exp), Q_ARG(QString, "hehe"))); QCOMPARE(exp, QString("yessir")); QCOMPARE(obj.slotResult, QString("sl1:hehe")); + + QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::doesNotExist()"); + QVERIFY(!QMetaObject::invokeMethod(&obj, "doesNotExist")); + QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl1(QString)(QString)"); + QVERIFY(!QMetaObject::invokeMethod(&obj, "sl1(QString)", Q_ARG(QString, "arg"))); + QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl3(QString)"); + QVERIFY(!QMetaObject::invokeMethod(&obj, "sl3", Q_ARG(QString, "arg"))); + QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl1(QString,QString,QString)"); + QVERIFY(!QMetaObject::invokeMethod(&obj, "sl1", Q_ARG(QString, "arg"), Q_ARG(QString, "arg"), Q_ARG(QString, "arg"))); + + //should not have changed since last test. + QCOMPARE(exp, QString("yessir")); + QCOMPARE(obj.slotResult, QString("sl1:hehe")); } void tst_QMetaObject::invokeQueuedMetaMember() |