summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/UicNoGui/MocOnly
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2018-11-27 12:06:21 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2018-11-28 12:06:05 (GMT)
commit0814d74548cda4e2e10183ed84ed8d0c4ff058fb (patch)
tree9953aebfcb90357ffbbde90ccae84cf949c1ebba /Tests/QtAutogen/UicNoGui/MocOnly
parent2ef640819fcf9ca741b3ebcb543b9a01ffb40689 (diff)
downloadCMake-0814d74548cda4e2e10183ed84ed8d0c4ff058fb.zip
CMake-0814d74548cda4e2e10183ed84ed8d0c4ff058fb.tar.gz
CMake-0814d74548cda4e2e10183ed84ed8d0c4ff058fb.tar.bz2
Autogen: Add QtAutogen.UicNoGui test
Adds a Qt core only test that has ``AUTOUIC`` enabled targets that don't link against QtXWidgets or Qt at all.
Diffstat (limited to 'Tests/QtAutogen/UicNoGui/MocOnly')
-rw-r--r--Tests/QtAutogen/UicNoGui/MocOnly/CMakeLists.txt3
-rw-r--r--Tests/QtAutogen/UicNoGui/MocOnly/main.cpp15
2 files changed, 18 insertions, 0 deletions
diff --git a/Tests/QtAutogen/UicNoGui/MocOnly/CMakeLists.txt b/Tests/QtAutogen/UicNoGui/MocOnly/CMakeLists.txt
new file mode 100644
index 0000000..4fcd75f
--- /dev/null
+++ b/Tests/QtAutogen/UicNoGui/MocOnly/CMakeLists.txt
@@ -0,0 +1,3 @@
+# Library uses QtCore only (no Widgets)
+add_library(mocOnly main.cpp)
+target_link_libraries(mocOnly ${QT_QTCORE_TARGET})
diff --git a/Tests/QtAutogen/UicNoGui/MocOnly/main.cpp b/Tests/QtAutogen/UicNoGui/MocOnly/main.cpp
new file mode 100644
index 0000000..3091845
--- /dev/null
+++ b/Tests/QtAutogen/UicNoGui/MocOnly/main.cpp
@@ -0,0 +1,15 @@
+#include <QObject>
+
+class LocalObject : public QObject
+{
+ Q_OBJECT
+public:
+ LocalObject(){};
+};
+
+void mocOnly()
+{
+ LocalObject obj;
+}
+
+#include "main.moc"