summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutomoc
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2011-11-22 21:26:42 (GMT)
committerStephen Kelly <steveire@gmail.com>2011-11-22 21:26:42 (GMT)
commit47457159c70d031cfdb5704ce461644446de5a26 (patch)
tree642f35b63c170a8bb4dc43d589827c37ff2da948 /Tests/QtAutomoc
parentbde4edb6ab6501de42bdc167e027a9f5c5760244 (diff)
downloadCMake-47457159c70d031cfdb5704ce461644446de5a26.zip
CMake-47457159c70d031cfdb5704ce461644446de5a26.tar.gz
CMake-47457159c70d031cfdb5704ce461644446de5a26.tar.bz2
Add a test case for the use of Q_PRIVATE_SLOT.
Diffstat (limited to 'Tests/QtAutomoc')
-rw-r--r--Tests/QtAutomoc/CMakeLists.txt2
-rw-r--r--Tests/QtAutomoc/private_slot.cpp21
-rw-r--r--Tests/QtAutomoc/private_slot.h20
3 files changed, 42 insertions, 1 deletions
diff --git a/Tests/QtAutomoc/CMakeLists.txt b/Tests/QtAutomoc/CMakeLists.txt
index f47d5fd..ebfb4f5 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 0000000..1387a70
--- /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 0000000..28e5448
--- /dev/null
+++ b/Tests/QtAutomoc/private_slot.h
@@ -0,0 +1,20 @@
+
+#ifndef PRIVATE_SLOT_H
+#define PRIVATE_SLOT_H
+
+#include <QObject>
+
+class PrivateSlotPrivate;
+
+class PrivateSlot : public QObject
+{
+ Q_OBJECT
+public:
+ PrivateSlot(QObject *parent = 0);
+
+private:
+ PrivateSlotPrivate * const d;
+ Q_PRIVATE_SLOT(d, void privateSlot())
+};
+
+#endif