summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-01-24 13:00:19 +0100
committerLiang Qi <liang.qi@qt.io>2017-01-24 13:00:19 +0100
commitc1c9abe5c0c9c42404d054e9e4335d112c3b388a (patch)
tree9f1c3a6e5d237fbc869a18b4643104527cca7e94 /tools
parentffc92d507a8e345cdd8a5e51be1724eb15dc9d34 (diff)
parentf53de9d4180ef716455d368558d3cb0898cf2b1b (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts: src/plugins/sceneparsers/gltf/gltfio.cpp src/render/io/objloader.cpp Change-Id: I094c9310d56657ab19b4722b946c60d8cb490191
Diffstat (limited to 'tools')
-rw-r--r--tools/tools.pro1
-rw-r--r--tools/utils/qtcreator/templates/wizards/classes/qt3d/file.cpp12
-rw-r--r--tools/utils/qtcreator/templates/wizards/classes/qt3d/file.h9
-rw-r--r--tools/utils/qtcreator/templates/wizards/classes/qt3d/file_p.h9
4 files changed, 19 insertions, 12 deletions
diff --git a/tools/tools.pro b/tools/tools.pro
index 09c7d8ebf..9c384630e 100644
--- a/tools/tools.pro
+++ b/tools/tools.pro
@@ -1,3 +1,2 @@
TEMPLATE = subdirs
!android:SUBDIRS += qgltf
-qgltf.CONFIG += host_build
diff --git a/tools/utils/qtcreator/templates/wizards/classes/qt3d/file.cpp b/tools/utils/qtcreator/templates/wizards/classes/qt3d/file.cpp
index 03d99bdbc..4200859a9 100644
--- a/tools/utils/qtcreator/templates/wizards/classes/qt3d/file.cpp
+++ b/tools/utils/qtcreator/templates/wizards/classes/qt3d/file.cpp
@@ -22,19 +22,19 @@ QT_BEGIN_NAMESPACE
%{CN}::~%{CN}()
{
- QNode::cleanup();
}
@else
// TODO: Implement QBackendNode template
@endif
@if '%{Base}' === 'QNode' || '%{Base}' === 'QComponent' || '%{Base}' === 'QEntity'
-void %{CN}::copy(const QNode *ref)
+Qt3DCore::QNodeCreatedChangeBasePtr %{CN}::createNodeCreationChange() const
{
- %{Base}::copy(ref);
- const %{CN} *object = static_cast<const %{CN} *>(ref);
-
- // TODO: Copy the objects's members
+ auto creationChange = Qt3DCore::QNodeCreatedChangePtr<%{CN}Data>::create(this);
+ auto &data = creationChange->data;
+ Q_D(const %{CN});
+ // TODO: Send data members in creation change
+ return creationChange;
}
@endif
%{JS: Cpp.closeNamespaces('%{Class}')}\
diff --git a/tools/utils/qtcreator/templates/wizards/classes/qt3d/file.h b/tools/utils/qtcreator/templates/wizards/classes/qt3d/file.h
index 7d2e76326..9060461eb 100644
--- a/tools/utils/qtcreator/templates/wizards/classes/qt3d/file.h
+++ b/tools/utils/qtcreator/templates/wizards/classes/qt3d/file.h
@@ -29,7 +29,7 @@ class %{CN}
@endif
public:
@if '%{Base}' === 'QNode' || '%{Base}' === 'QComponent' || '%{Base}' === 'QEntity'
- explicit %{CN}(Qt3DCore::QNode *parent = 0);
+ explicit %{CN}(Qt3DCore::QNode *parent = nullptr);
@else
%{CN}();
@endif
@@ -41,12 +41,11 @@ Q_SIGNALS:
@if '%{Base}' === 'QNode' || '%{Base}' === 'QComponent' || '%{Base}' === 'QEntity'
protected:
- Q_DECLARE_PRIVATE(%{CN})
- %{CN}(%{CN}Private &dd, Qt3DCore::QNode *parent = 0);
- void copy(const Qt3DCore::QNode *ref) Q_DECL_OVERRIDE;
+ %{CN}(%{CN}Private &dd, Qt3DCore::QNode *parent = nullptr);
private:
- QT3D_CLONEABLE(%{CN})
+ Q_DECLARE_PRIVATE(%{CN})
+ Qt3DCore::QNodeCreatedChangeBasePtr createNodeCreationChange() const Q_DECL_OVERRIDE;
@endif
};
%{JS: Cpp.closeNamespaces('%{Class}')}
diff --git a/tools/utils/qtcreator/templates/wizards/classes/qt3d/file_p.h b/tools/utils/qtcreator/templates/wizards/classes/qt3d/file_p.h
index 71203930e..9de21e805 100644
--- a/tools/utils/qtcreator/templates/wizards/classes/qt3d/file_p.h
+++ b/tools/utils/qtcreator/templates/wizards/classes/qt3d/file_p.h
@@ -31,8 +31,17 @@ class %{CN}Private : public Qt3DCore::%{Base}Private
public:
%{CN}Private();
+ Q_DECLARE_PUBLIC(%{CN})
+ // TODO Add member variables
};
+@if '%{Base}' === 'QNode' || '%{Base}' === 'QComponent'
+
+struct %{CN}Data
+{
+ // TODO: Add members that should be sent to the backend
+};
+@endif
%{JS: Cpp.closeNamespaces('%{Class}')}
QT_END_NAMESPACE