diff options
Diffstat (limited to 'tools')
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 |