From 0731c90eec594224954ea1c6677e6bf2cff50e51 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 2 Mar 2012 12:41:43 +0100 Subject: moc: test signature with (void) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id63ed21e9f5e7447ced877ec19a2786d20f439f0 Reviewed-by: Kent Hansen Reviewed-by: Jędrzej Nowacki --- tests/auto/tools/moc/slots-with-void-template.h | 2 ++ tests/auto/tools/moc/tst_moc.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/auto/tools/moc/slots-with-void-template.h b/tests/auto/tools/moc/slots-with-void-template.h index 081b03eb4a..73f07d1dc7 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 e8639eec47..f7ce54959e 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() -- cgit v1.2.3