diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-20 08:32:45 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-20 08:32:45 (GMT) |
commit | 7bdbf59e43bd5db584923402b8a2ce2f50d1ca4b (patch) | |
tree | 3080c1a00742cdfc0ed72d4d334e9c30a5a6f4f9 /tests | |
parent | cc4b3c0f9c66a586df67992f5b3687fbab4029d6 (diff) | |
parent | da1874efea7d5f510228f4d181fbdd6160551e38 (diff) | |
download | Qt-7bdbf59e43bd5db584923402b8a2ce2f50d1ca4b.zip Qt-7bdbf59e43bd5db584923402b8a2ce2f50d1ca4b.tar.gz Qt-7bdbf59e43bd5db584923402b8a2ce2f50d1ca4b.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:
moc: Slot with complex template default value does not compile
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/moc/tst_moc.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/moc/tst_moc.cpp b/tests/auto/moc/tst_moc.cpp index 19f3677..4fcc7bd 100644 --- a/tests/auto/moc/tst_moc.cpp +++ b/tests/auto/moc/tst_moc.cpp @@ -491,6 +491,7 @@ private slots: void typenameWithUnsigned(); void warnOnVirtualSignal(); void QTBUG5590_dummyProperty(); + void QTBUG12260_defaultTemplate(); signals: void sigWithUnsignedArg(unsigned foo); void sigWithSignedArg(signed foo); @@ -1340,6 +1341,20 @@ signals: void testSignal(TestTemplate2<const int, const short*>); }; +class QTBUG12260_defaultTemplate_Object : public QObject +{ Q_OBJECT +public slots: + void doSomething(QHash<QString, QVariant> values = QHash<QString, QVariant>()) { Q_UNUSED(values); } + void doAnotherThing(bool a = (1 < 3), bool b = (1 > 4)) { Q_UNUSED(a); Q_UNUSED(b); } +}; + + +void tst_Moc::QTBUG12260_defaultTemplate() +{ + QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("doSomething(QHash<QString,QVariant>)") != -1); + QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("doAnotherThing(bool,bool)") != -1); +} + QTEST_APPLESS_MAIN(tst_Moc) #include "tst_moc.moc" |