summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2012-03-02 12:41:43 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-16 17:37:18 +0100
commit0731c90eec594224954ea1c6677e6bf2cff50e51 (patch)
tree97224b805acf5795abb47f137c4e0db22452b41d /tests/auto/tools
parentde38f914e898b0333ff9ef452ee9d1caa1907999 (diff)
moc: test signature with (void)
Change-Id: Id63ed21e9f5e7447ced877ec19a2786d20f439f0 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'tests/auto/tools')
-rw-r--r--tests/auto/tools/moc/slots-with-void-template.h2
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp2
2 files changed, 4 insertions, 0 deletions
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<void> &) {}
inline TestTemplate<void> mySlot() { return TestTemplate<void>(); }
signals:
void mySignal(const TestTemplate<void> &);
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<void> &)),
&test, SLOT(anotherSlot(const TestTemplate<void> &))));
+ QVERIFY(QObject::connect(&test, SIGNAL(myVoidSignal2()),
+ &test, SLOT(dummySlot2())));
}
void tst_Moc::structQObject()