diff options
author | Jake Petroules <jake.petroules@theqtcompany.com> | 2016-03-25 21:56:19 -0700 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2016-04-06 11:20:45 +0000 |
commit | ad78ab0bd362c79b58ebb44dfd0646f49027bb37 (patch) | |
tree | 68455f1c6a014f9e4ca61dbd01e3f5ddfb7894ab /tests | |
parent | 25208193f502801475a8f8e571827e027c77ca40 (diff) | |
download | qbs-ad78ab0bd362c79b58ebb44dfd0646f49027bb37.tar.gz |
Correctly handle Objective-C++ source files in moc.
Task-number: QBS-951
Change-Id: I692ac696f22ccc02c0db530abf66ae24a1a398fa
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/api/testdata/moc-hpp-included/object2.h | 13 | ||||
-rw-r--r-- | tests/auto/api/testdata/moc-hpp-included/object2.mm | 16 | ||||
-rw-r--r-- | tests/auto/api/testdata/moc-hpp-included/project.qbs | 6 |
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"] } } } |