summaryrefslogtreecommitdiff
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/api/testdata/moc-hpp-included/object2.h13
-rw-r--r--tests/auto/api/testdata/moc-hpp-included/object2.mm16
-rw-r--r--tests/auto/api/testdata/moc-hpp-included/project.qbs6
3 files changed, 32 insertions, 3 deletions
diff --git a/tests/auto/api/testdata/moc-hpp-included/object2.h b/tests/auto/api/testdata/moc-hpp-included/object2.h
new file mode 100644
index 000000000..14e811124
--- /dev/null
+++ b/tests/auto/api/testdata/moc-hpp-included/object2.h
@@ -0,0 +1,13 @@
+#ifndef OBJECT2_H
+#define OBJECT2_H
+#include <QObject>
+
+class Object2 : public QObject
+{
+ Q_OBJECT
+public:
+ Object2(QObject *parent = 0);
+};
+
+#endif
+
diff --git a/tests/auto/api/testdata/moc-hpp-included/object2.mm b/tests/auto/api/testdata/moc-hpp-included/object2.mm
new file mode 100644
index 000000000..6fd95d31f
--- /dev/null
+++ b/tests/auto/api/testdata/moc-hpp-included/object2.mm
@@ -0,0 +1,16 @@
+#include "object2.h"
+
+Object2::Object2(QObject *parent)
+ : QObject(parent)
+{}
+
+#include "moc_object2.cpp"
+#include <cstdio>
+
+int main2()
+{
+ Object2 obj;
+ printf("Hello World\n");
+ return 0;
+}
+
diff --git a/tests/auto/api/testdata/moc-hpp-included/project.qbs b/tests/auto/api/testdata/moc-hpp-included/project.qbs
index d78493b2f..554b0a2b3 100644
--- a/tests/auto/api/testdata/moc-hpp-included/project.qbs
+++ b/tests/auto/api/testdata/moc-hpp-included/project.qbs
@@ -8,11 +8,11 @@ Project {
Depends { name: "Qt.core" }
- files : [ "object.cpp" ]
+ files: ["object.cpp", "object.h"]
Group {
- files : [ "object.h" ]
- fileTags: [ "hpp" ]
+ condition: qbs.targetOS.contains("darwin")
+ files: ["object2.mm", "object2.h"]
}
}
}