diff --git a/Tests/QtAutomoc/CMakeLists.txt b/Tests/QtAutomoc/CMakeLists.txt index f47d5fde5..ebfb4f5fb 100644 --- a/Tests/QtAutomoc/CMakeLists.txt +++ b/Tests/QtAutomoc/CMakeLists.txt @@ -13,7 +13,7 @@ add_definitions(-DFOO) # create an executable and a library target, both requiring automoc: add_library(codeeditorLib STATIC codeeditor.cpp) -add_executable(foo main.cpp calwidget.cpp foo.cpp blub.cpp bar.cpp abc.cpp xyz.cpp yaf.cpp) +add_executable(foo main.cpp calwidget.cpp foo.cpp blub.cpp bar.cpp abc.cpp xyz.cpp yaf.cpp private_slot.cpp) set_target_properties(foo codeeditorLib PROPERTIES AUTOMOC TRUE) diff --git a/Tests/QtAutomoc/private_slot.cpp b/Tests/QtAutomoc/private_slot.cpp new file mode 100644 index 000000000..1387a70cf --- /dev/null +++ b/Tests/QtAutomoc/private_slot.cpp @@ -0,0 +1,21 @@ + +#include "private_slot.h" + +class PrivateSlotPrivate +{ +public: + + void privateSlot() + { + + } +}; + +PrivateSlot::PrivateSlot(QObject *parent) + : QObject(parent), + d(new PrivateSlotPrivate) +{ + +} + +#include "private_slot.moc" diff --git a/Tests/QtAutomoc/private_slot.h b/Tests/QtAutomoc/private_slot.h new file mode 100644 index 000000000..28e54482a --- /dev/null +++ b/Tests/QtAutomoc/private_slot.h @@ -0,0 +1,20 @@ + +#ifndef PRIVATE_SLOT_H +#define PRIVATE_SLOT_H + +#include + +class PrivateSlotPrivate; + +class PrivateSlot : public QObject +{ + Q_OBJECT +public: + PrivateSlot(QObject *parent = 0); + +private: + PrivateSlotPrivate * const d; + Q_PRIVATE_SLOT(d, void privateSlot()) +}; + +#endif