aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata-qt
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2017-10-23 10:49:35 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2017-10-24 13:33:36 +0000
commit26b80fd95660c8a8c920bb32991a9d896ed25beb (patch)
tree1b77b5ecc286ea67e561d53f2c3f652ff3b23ee1 /tests/auto/blackbox/testdata-qt
parent0ce5c7dc726a638cd5a325aa2e24d5c1fe20cba6 (diff)
Make it possible to mark non-generated C++ header files as "unmocable"
Let the moc rule check its inputs for the "unmocable" file tag and ignore such artifacts. The already existing excludeAuxiliaryInputs assignment only prevents connections to rules that produce unmocable artifacts. Change-Id: I2f51c3d86e9127a62c592e28182c16f456340ab8 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/auto/blackbox/testdata-qt')
-rw-r--r--tests/auto/blackbox/testdata-qt/unmocable/foo.h2
-rw-r--r--tests/auto/blackbox/testdata-qt/unmocable/main.cpp6
-rw-r--r--tests/auto/blackbox/testdata-qt/unmocable/unmocable.qbs11
3 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata-qt/unmocable/foo.h b/tests/auto/blackbox/testdata-qt/unmocable/foo.h
new file mode 100644
index 000000000..a67438a72
--- /dev/null
+++ b/tests/auto/blackbox/testdata-qt/unmocable/foo.h
@@ -0,0 +1,2 @@
+#define Q_OBJECT 156
+int someNumber() { return Q_OBJECT; }
diff --git a/tests/auto/blackbox/testdata-qt/unmocable/main.cpp b/tests/auto/blackbox/testdata-qt/unmocable/main.cpp
new file mode 100644
index 000000000..e7a3f8df9
--- /dev/null
+++ b/tests/auto/blackbox/testdata-qt/unmocable/main.cpp
@@ -0,0 +1,6 @@
+#include "foo.h"
+
+int main()
+{
+ return someNumber() - 156;
+}
diff --git a/tests/auto/blackbox/testdata-qt/unmocable/unmocable.qbs b/tests/auto/blackbox/testdata-qt/unmocable/unmocable.qbs
new file mode 100644
index 000000000..bb86fb223
--- /dev/null
+++ b/tests/auto/blackbox/testdata-qt/unmocable/unmocable.qbs
@@ -0,0 +1,11 @@
+import qbs
+
+Application {
+ Depends { name: "Qt.core" }
+ files: ["main.cpp"]
+ Group {
+ files: ["foo.h"]
+ fileTags: ["unmocable"]
+ overrideTags: false
+ }
+}