diff --git a/tests/auto/tools/moc/slots-with-void-template.h b/tests/auto/tools/moc/slots-with-void-template.h index 081b03eb4ab..73f07d1dc74 100644 --- a/tests/auto/tools/moc/slots-with-void-template.h +++ b/tests/auto/tools/moc/slots-with-void-template.h @@ -51,9 +51,11 @@ class SlotsWithVoidTemplateTest : public QObject Q_OBJECT public slots: inline void dummySlot() {} + inline void dummySlot2(void) {} inline void anotherSlot(const TestTemplate &) {} inline TestTemplate mySlot() { return TestTemplate(); } signals: void mySignal(const TestTemplate &); void myVoidSignal(); + void myVoidSignal2(void); }; diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index e8639eec474..f7ce54959e2 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -874,6 +874,8 @@ void tst_Moc::slotsWithVoidTemplate() &test, SLOT(dummySlot(void)))); QVERIFY(QObject::connect(&test, SIGNAL(mySignal(const TestTemplate &)), &test, SLOT(anotherSlot(const TestTemplate &)))); + QVERIFY(QObject::connect(&test, SIGNAL(myVoidSignal2()), + &test, SLOT(dummySlot2()))); } void tst_Moc::structQObject()