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>
This commit is contained in:
Olivier Goffart 2012-03-02 12:41:43 +01:00 committed by Qt by Nokia
parent de38f914e8
commit 0731c90eec
2 changed files with 4 additions and 0 deletions

View File

@ -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);
};

View File

@ -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()