summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bulletphysics/qabstractcollider.cpp8
-rw-r--r--src/bulletphysics/qabstractcollider.h1
-rw-r--r--src/bulletphysics/qabstractcollider_p.h2
-rw-r--r--src/bulletphysics/qboxcollider.cpp10
-rw-r--r--src/bulletphysics/qboxcollider.h1
-rw-r--r--src/bulletphysics/qboxcollider_p.h2
-rw-r--r--src/bulletphysics/qrigidbody.cpp10
-rw-r--r--src/bulletphysics/qrigidbody.h1
-rw-r--r--src/bulletphysics/qrigidbody_p.h2
-rw-r--r--src/bulletphysics/qspherecollider.cpp10
-rw-r--r--src/bulletphysics/qspherecollider.h1
-rw-r--r--src/bulletphysics/qspherecollider_p.h2
-rw-r--r--src/core/core-components/qabstractmesh.cpp10
-rw-r--r--src/core/core-components/qabstractmesh.h1
-rw-r--r--src/core/core-components/qabstractmesh_p.h2
-rw-r--r--src/core/core-components/qcameralens.cpp26
-rw-r--r--src/core/core-components/qcameralens.h1
-rw-r--r--src/core/core-components/qcameralens_p.h2
-rw-r--r--src/core/nodes/qentity.cpp14
-rw-r--r--src/core/nodes/qentity.h1
-rw-r--r--src/core/nodes/qentity_p.h2
-rw-r--r--src/core/nodes/qnode.cpp11
-rw-r--r--src/core/nodes/qnode_p.h3
-rw-r--r--src/core/transforms/qlookattransform.cpp16
-rw-r--r--src/core/transforms/qlookattransform.h5
-rw-r--r--src/core/transforms/qlookattransform_p.h2
-rw-r--r--src/core/transforms/qmatrixtransform.cpp8
-rw-r--r--src/core/transforms/qmatrixtransform.h5
-rw-r--r--src/core/transforms/qmatrixtransform_p.h2
-rw-r--r--src/core/transforms/qrotatetransform.cpp10
-rw-r--r--src/core/transforms/qrotatetransform.h1
-rw-r--r--src/core/transforms/qrotatetransform_p.h2
-rw-r--r--src/core/transforms/qscaletransform.cpp8
-rw-r--r--src/core/transforms/qscaletransform.h1
-rw-r--r--src/core/transforms/qscaletransform_p.h2
-rw-r--r--src/core/transforms/qtransform.cpp12
-rw-r--r--src/core/transforms/qtransform.h2
-rw-r--r--src/core/transforms/qtransform_p.h2
-rw-r--r--src/core/transforms/qtranslatetransform.cpp8
-rw-r--r--src/core/transforms/qtranslatetransform.h1
-rw-r--r--src/core/transforms/qtranslatetransform_p.h2
-rw-r--r--src/render/frontend/framegraph-components/qcameraselector.cpp14
-rw-r--r--src/render/frontend/framegraph-components/qcameraselector.h5
-rw-r--r--src/render/frontend/framegraph-components/qcameraselector_p.h1
-rw-r--r--src/render/frontend/framegraph-components/qclearbuffer.cpp12
-rw-r--r--src/render/frontend/framegraph-components/qclearbuffer.h1
-rw-r--r--src/render/frontend/framegraph-components/qclearbuffer_p.h2
-rw-r--r--src/render/frontend/framegraph-components/qframegraph.cpp8
-rw-r--r--src/render/frontend/framegraph-components/qframegraph.h1
-rw-r--r--src/render/frontend/framegraph-components/qframegraph_p.h1
-rw-r--r--src/render/frontend/framegraph-components/qframegraphitem.cpp4
-rw-r--r--src/render/frontend/framegraph-components/qframegraphitem.h1
-rw-r--r--src/render/frontend/framegraph-components/qframegraphitem_p.h2
-rw-r--r--src/render/frontend/framegraph-components/qlayerfilter.cpp12
-rw-r--r--src/render/frontend/framegraph-components/qlayerfilter.h1
-rw-r--r--src/render/frontend/framegraph-components/qlayerfilter_p.h2
-rw-r--r--src/render/frontend/framegraph-components/qrenderpassfilter.cpp14
-rw-r--r--src/render/frontend/framegraph-components/qrenderpassfilter.h1
-rw-r--r--src/render/frontend/framegraph-components/qrenderpassfilter_p.h1
-rw-r--r--src/render/frontend/framegraph-components/qrendertargetselector.cpp14
-rw-r--r--src/render/frontend/framegraph-components/qrendertargetselector.h1
-rw-r--r--src/render/frontend/framegraph-components/qrendertargetselector_p.h1
-rw-r--r--src/render/frontend/framegraph-components/qsortcriterion.cpp8
-rw-r--r--src/render/frontend/framegraph-components/qsortcriterion.h1
-rw-r--r--src/render/frontend/framegraph-components/qsortcriterion_p.h2
-rw-r--r--src/render/frontend/framegraph-components/qsortmethod.cpp10
-rw-r--r--src/render/frontend/framegraph-components/qsortmethod.h1
-rw-r--r--src/render/frontend/framegraph-components/qsortmethod_p.h1
-rw-r--r--src/render/frontend/framegraph-components/qtechniquefilter.cpp14
-rw-r--r--src/render/frontend/framegraph-components/qtechniquefilter.h1
-rw-r--r--src/render/frontend/framegraph-components/qtechniquefilter_p.h1
-rw-r--r--src/render/frontend/framegraph-components/qviewport.cpp12
-rw-r--r--src/render/frontend/framegraph-components/qviewport.h1
-rw-r--r--src/render/frontend/framegraph-components/qviewport_p.h2
-rw-r--r--src/render/frontend/qabstractlight.cpp10
-rw-r--r--src/render/frontend/qabstractlight.h5
-rw-r--r--src/render/frontend/qabstractlight_p.h2
-rw-r--r--src/render/frontend/qabstractsceneloader.cpp6
-rw-r--r--src/render/frontend/qabstractsceneloader.h5
-rw-r--r--src/render/frontend/qabstractsceneloader_p.h2
-rw-r--r--src/render/frontend/qalphatest.cpp12
-rw-r--r--src/render/frontend/qalphatest.h3
-rw-r--r--src/render/frontend/qblendequation.cpp10
-rw-r--r--src/render/frontend/qblendequation.h3
-rw-r--r--src/render/frontend/qblendstate.cpp16
-rw-r--r--src/render/frontend/qblendstate.h3
-rw-r--r--src/render/frontend/qcriterion.cpp10
-rw-r--r--src/render/frontend/qcriterion.h3
-rw-r--r--src/render/frontend/qcriterion_p.h2
-rw-r--r--src/render/frontend/qcuboidmesh.cpp18
-rw-r--r--src/render/frontend/qcuboidmesh.h1
-rw-r--r--src/render/frontend/qcuboidmesh_p.h2
-rw-r--r--src/render/frontend/qcullface.cpp10
-rw-r--r--src/render/frontend/qcullface.h3
-rw-r--r--src/render/frontend/qcylindermesh.cpp16
-rw-r--r--src/render/frontend/qcylindermesh.h3
-rw-r--r--src/render/frontend/qdepthmask.cpp10
-rw-r--r--src/render/frontend/qdepthmask.h3
-rw-r--r--src/render/frontend/qdepthtest.cpp10
-rw-r--r--src/render/frontend/qdepthtest.h3
-rw-r--r--src/render/frontend/qdirectionallight.cpp8
-rw-r--r--src/render/frontend/qdirectionallight.h1
-rw-r--r--src/render/frontend/qdirectionallight_p.h2
-rw-r--r--src/render/frontend/qeffect.cpp14
-rw-r--r--src/render/frontend/qeffect.h1
-rw-r--r--src/render/frontend/qeffect_p.h2
-rw-r--r--src/render/frontend/qfrontface.cpp10
-rw-r--r--src/render/frontend/qfrontface.h3
-rw-r--r--src/render/frontend/qlayer.cpp8
-rw-r--r--src/render/frontend/qlayer.h1
-rw-r--r--src/render/frontend/qlayer_p.h2
-rw-r--r--src/render/frontend/qmaterial.cpp14
-rw-r--r--src/render/frontend/qmaterial.h1
-rw-r--r--src/render/frontend/qmaterial_p.h2
-rw-r--r--src/render/frontend/qmesh.cpp8
-rw-r--r--src/render/frontend/qmesh.h1
-rw-r--r--src/render/frontend/qmesh_p.h2
-rw-r--r--src/render/frontend/qparameter.cpp12
-rw-r--r--src/render/frontend/qparameter.h1
-rw-r--r--src/render/frontend/qparameter_p.h1
-rw-r--r--src/render/frontend/qparametermapper.cpp12
-rw-r--r--src/render/frontend/qparametermapper.h1
-rw-r--r--src/render/frontend/qparametermapper_p.h2
-rw-r--r--src/render/frontend/qplanemesh.cpp12
-rw-r--r--src/render/frontend/qplanemesh.h1
-rw-r--r--src/render/frontend/qplanemesh_p.h2
-rw-r--r--src/render/frontend/qrenderattachment.cpp10
-rw-r--r--src/render/frontend/qrenderattachment.h1
-rw-r--r--src/render/frontend/qrenderattachment_p.h2
-rw-r--r--src/render/frontend/qrenderpass.cpp22
-rw-r--r--src/render/frontend/qrenderpass.h1
-rw-r--r--src/render/frontend/qrenderpass_p.h1
-rw-r--r--src/render/frontend/qrendertarget.cpp10
-rw-r--r--src/render/frontend/qrendertarget.h1
-rw-r--r--src/render/frontend/qrendertarget_p.h2
-rw-r--r--src/render/frontend/qsceneloader.cpp2
-rw-r--r--src/render/frontend/qscissortest.cpp16
-rw-r--r--src/render/frontend/qscissortest.h3
-rw-r--r--src/render/frontend/qshaderprogram.cpp34
-rw-r--r--src/render/frontend/qshaderprogram.h1
-rw-r--r--src/render/frontend/qshaderprogram_p.h2
-rw-r--r--src/render/frontend/qspheremesh.cpp16
-rw-r--r--src/render/frontend/qspheremesh.h3
-rw-r--r--src/render/frontend/qspotlight.cpp10
-rw-r--r--src/render/frontend/qspotlight.h1
-rw-r--r--src/render/frontend/qspotlight_p.h2
-rw-r--r--src/render/frontend/qstenciltest.cpp14
-rw-r--r--src/render/frontend/qstenciltest.h3
-rw-r--r--src/render/frontend/qtechnique.cpp20
-rw-r--r--src/render/frontend/qtechnique.h1
-rw-r--r--src/render/frontend/qtechnique_p.h2
-rw-r--r--src/render/frontend/qtexture.cpp26
-rw-r--r--src/render/frontend/qtexture.h1
-rw-r--r--src/render/frontend/qtorusmesh.cpp16
-rw-r--r--src/render/frontend/qtorusmesh.h3
-rw-r--r--src/render/io/gltfparser.cpp13
156 files changed, 440 insertions, 459 deletions
diff --git a/src/bulletphysics/qabstractcollider.cpp b/src/bulletphysics/qabstractcollider.cpp
index 7f1343f03..599dc7b4a 100644
--- a/src/bulletphysics/qabstractcollider.cpp
+++ b/src/bulletphysics/qabstractcollider.cpp
@@ -53,11 +53,11 @@ QAbstractColliderPrivate::QAbstractColliderPrivate(QAbstractCollider *qq)
{
}
-void QAbstractColliderPrivate::copy(const QNodePrivate *ref)
+void QAbstractCollider::copy(const QNode *ref)
{
- QComponentPrivate::copy(ref);
- const QAbstractColliderPrivate *other = static_cast<const QAbstractColliderPrivate *>(ref);
- m_collisionBehavior = other->m_collisionBehavior;
+ QComponent::copy(ref);
+ const QAbstractCollider *other = static_cast<const QAbstractCollider *>(ref);
+ d_func()->m_collisionBehavior = other->d_func()->m_collisionBehavior;
}
QAbstractCollider::QAbstractCollider(QNode *parent)
diff --git a/src/bulletphysics/qabstractcollider.h b/src/bulletphysics/qabstractcollider.h
index 5d89f451d..d40a3543d 100644
--- a/src/bulletphysics/qabstractcollider.h
+++ b/src/bulletphysics/qabstractcollider.h
@@ -75,6 +75,7 @@ Q_SIGNALS:
protected:
QAbstractCollider(QAbstractColliderPrivate &dd, Qt3D::QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QAbstractCollider)
diff --git a/src/bulletphysics/qabstractcollider_p.h b/src/bulletphysics/qabstractcollider_p.h
index 2db46943d..1d519c3c9 100644
--- a/src/bulletphysics/qabstractcollider_p.h
+++ b/src/bulletphysics/qabstractcollider_p.h
@@ -57,8 +57,6 @@ class QAbstractColliderPrivate : public Qt3D::QComponentPrivate
public:
QAbstractColliderPrivate(QAbstractCollider *qq);
- virtual void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QAbstractCollider)
QAbstractCollider::CollisionBehavior m_collisionBehavior;
diff --git a/src/bulletphysics/qboxcollider.cpp b/src/bulletphysics/qboxcollider.cpp
index 528a0fc57..b7f2fdc20 100644
--- a/src/bulletphysics/qboxcollider.cpp
+++ b/src/bulletphysics/qboxcollider.cpp
@@ -54,12 +54,12 @@ QBoxColliderPrivate::QBoxColliderPrivate(QBoxCollider *qq)
{
}
-void QBoxColliderPrivate::copy(const QNodePrivate *ref)
+void QBoxCollider::copy(const QNode *ref)
{
- QAbstractColliderPrivate::copy(ref);
- const QBoxColliderPrivate *other = static_cast<const QBoxColliderPrivate *>(ref);
- m_center = other->m_center;
- m_halfExtents = other->m_halfExtents;
+ QAbstractCollider::copy(ref);
+ const QBoxCollider *other = static_cast<const QBoxCollider*>(ref);
+ d_func()->m_center = other->d_func()->m_center;
+ d_func()->m_halfExtents = other->d_func()->m_halfExtents;
}
QBoxCollider::QBoxCollider(Qt3D::QNode *parent)
diff --git a/src/bulletphysics/qboxcollider.h b/src/bulletphysics/qboxcollider.h
index ddb05d407..70449974d 100644
--- a/src/bulletphysics/qboxcollider.h
+++ b/src/bulletphysics/qboxcollider.h
@@ -76,6 +76,7 @@ Q_SIGNALS:
protected:
QBoxCollider(QBoxColliderPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QBoxCollider)
diff --git a/src/bulletphysics/qboxcollider_p.h b/src/bulletphysics/qboxcollider_p.h
index bee8535d9..d40d7e4c2 100644
--- a/src/bulletphysics/qboxcollider_p.h
+++ b/src/bulletphysics/qboxcollider_p.h
@@ -58,8 +58,6 @@ class QBoxColliderPrivate : public QAbstractColliderPrivate
public:
QBoxColliderPrivate(QBoxCollider *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QBoxCollider)
QVector3D m_center;
diff --git a/src/bulletphysics/qrigidbody.cpp b/src/bulletphysics/qrigidbody.cpp
index eb5135e15..ed87cbd8b 100644
--- a/src/bulletphysics/qrigidbody.cpp
+++ b/src/bulletphysics/qrigidbody.cpp
@@ -65,12 +65,12 @@ QRigidBody::QRigidBody(QRigidBodyPrivate &dd, Qt3D::QNode *parent)
{
}
-void QRigidBodyPrivate::copy(const QNodePrivate *ref)
+void QRigidBody::copy(const QNode *ref)
{
- QRigidBodyPrivate::copy(ref);
- const QRigidBodyPrivate *other = static_cast<const QRigidBodyPrivate *>(ref);
- m_mass = other->m_mass;
- m_centerOfMass = other->m_centerOfMass;
+ QRigidBody::copy(ref);
+ const QRigidBody *other = static_cast<const QRigidBody*>(ref);
+ d_func()->m_mass = other->d_func()->m_mass;
+ d_func()->m_centerOfMass = other->d_func()->m_centerOfMass;
}
void QRigidBody::setMass(float mass)
diff --git a/src/bulletphysics/qrigidbody.h b/src/bulletphysics/qrigidbody.h
index 8178e80fc..9f463b04e 100644
--- a/src/bulletphysics/qrigidbody.h
+++ b/src/bulletphysics/qrigidbody.h
@@ -79,6 +79,7 @@ Q_SIGNALS:
protected:
QRigidBody(QRigidBodyPrivate &dd, Qt3D::QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QRigidBody)
diff --git a/src/bulletphysics/qrigidbody_p.h b/src/bulletphysics/qrigidbody_p.h
index e99b59705..e56545b2f 100644
--- a/src/bulletphysics/qrigidbody_p.h
+++ b/src/bulletphysics/qrigidbody_p.h
@@ -55,8 +55,6 @@ class QRigidBodyPrivate : public Qt3D::QComponentPrivate
public:
explicit QRigidBodyPrivate(QRigidBody *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QRigidBody)
float m_mass;
diff --git a/src/bulletphysics/qspherecollider.cpp b/src/bulletphysics/qspherecollider.cpp
index ad05b4618..4f2a50b52 100644
--- a/src/bulletphysics/qspherecollider.cpp
+++ b/src/bulletphysics/qspherecollider.cpp
@@ -65,12 +65,12 @@ QSphereCollider::QSphereCollider(QSphereColliderPrivate &dd, QNode *parent)
{
}
-void QSphereColliderPrivate::copy(const QNodePrivate *ref)
+void QSphereCollider::copy(const QNode *ref)
{
- QAbstractColliderPrivate::copy(ref);
- const QSphereColliderPrivate *other = static_cast<const QSphereColliderPrivate *>(ref);
- m_center = other->m_center;
- m_radius = other->m_radius;
+ QAbstractCollider::copy(ref);
+ const QSphereCollider *other = static_cast<const QSphereCollider*>(ref);
+ d_func()->m_center = other->d_func()->m_center;
+ d_func()->m_radius = other->d_func()->m_radius;
}
void QSphereCollider::setCenter(const QVector3D &center)
diff --git a/src/bulletphysics/qspherecollider.h b/src/bulletphysics/qspherecollider.h
index b4aeb809b..30fc796a0 100644
--- a/src/bulletphysics/qspherecollider.h
+++ b/src/bulletphysics/qspherecollider.h
@@ -76,6 +76,7 @@ Q_SIGNALS:
protected:
QSphereCollider(QSphereColliderPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QSphereCollider)
diff --git a/src/bulletphysics/qspherecollider_p.h b/src/bulletphysics/qspherecollider_p.h
index 0846aa71a..3dc30206a 100644
--- a/src/bulletphysics/qspherecollider_p.h
+++ b/src/bulletphysics/qspherecollider_p.h
@@ -57,8 +57,6 @@ class QSphereColliderPrivate : public QAbstractColliderPrivate
public:
QSphereColliderPrivate(QSphereCollider *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QSphereCollider)
QVector3D m_center;
diff --git a/src/core/core-components/qabstractmesh.cpp b/src/core/core-components/qabstractmesh.cpp
index 415f0c78f..76492560c 100644
--- a/src/core/core-components/qabstractmesh.cpp
+++ b/src/core/core-components/qabstractmesh.cpp
@@ -66,12 +66,12 @@ QAbstractMeshPrivate::QAbstractMeshPrivate(QAbstractMesh *qq)
{
}
-void QAbstractMeshPrivate::copy(const QNodePrivate *ref)
+void QAbstractMesh::copy(const QNode *ref)
{
- QNodePrivate::copy(ref);
- const QAbstractMeshPrivate *abstractMesh = static_cast<const QAbstractMeshPrivate *>(ref);
- m_uuid = abstractMesh->m_uuid;
- m_dirty = abstractMesh->m_dirty;
+ QComponent::copy(ref);
+ const QAbstractMesh *abstractMesh = static_cast<const QAbstractMesh*>(ref);
+ d_func()->m_uuid = abstractMesh->d_func()->m_uuid;
+ d_func()->m_dirty = abstractMesh->d_func()->m_dirty;
}
diff --git a/src/core/core-components/qabstractmesh.h b/src/core/core-components/qabstractmesh.h
index 3a6725ccd..2afaba48a 100644
--- a/src/core/core-components/qabstractmesh.h
+++ b/src/core/core-components/qabstractmesh.h
@@ -79,6 +79,7 @@ public:
protected:
QAbstractMesh(QAbstractMeshPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QAbstractMesh)
diff --git a/src/core/core-components/qabstractmesh_p.h b/src/core/core-components/qabstractmesh_p.h
index 3ef172bee..99d00ac67 100644
--- a/src/core/core-components/qabstractmesh_p.h
+++ b/src/core/core-components/qabstractmesh_p.h
@@ -60,8 +60,6 @@ class QT3DCORESHARED_EXPORT QAbstractMeshPrivate : public QComponentPrivate
public:
QAbstractMeshPrivate(QAbstractMesh *qq);
- virtual void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QAbstractMesh)
QUuid m_uuid;
diff --git a/src/core/core-components/qcameralens.cpp b/src/core/core-components/qcameralens.cpp
index 6660c27de..3d054c0ec 100644
--- a/src/core/core-components/qcameralens.cpp
+++ b/src/core/core-components/qcameralens.cpp
@@ -68,20 +68,20 @@ QCameraLens::QCameraLens(QNode *parent)
d->updateProjectionMatrix();
}
-void QCameraLensPrivate::copy(const QNodePrivate *ref)
+void QCameraLens::copy(const QNode *ref)
{
- QComponentPrivate::copy(ref);
- const QCameraLensPrivate *lens = static_cast<const QCameraLensPrivate *>(ref);
- m_projectionType = lens->m_projectionType;
- m_nearPlane = lens->m_nearPlane;
- m_farPlane = lens->m_farPlane;
- m_fieldOfView = lens->m_fieldOfView;
- m_aspectRatio = lens->m_aspectRatio;
- m_left = lens->m_left;
- m_right = lens->m_right;
- m_bottom = lens->m_bottom;
- m_top = lens->m_top;
- m_projectionMatrix = lens->m_projectionMatrix;
+ QComponent::copy(ref);
+ const QCameraLens *lens = static_cast<const QCameraLens*>(ref);
+ d_func()->m_projectionType = lens->d_func()->m_projectionType;
+ d_func()->m_nearPlane = lens->d_func()->m_nearPlane;
+ d_func()->m_farPlane = lens->d_func()->m_farPlane;
+ d_func()->m_fieldOfView = lens->d_func()->m_fieldOfView;
+ d_func()->m_aspectRatio = lens->d_func()->m_aspectRatio;
+ d_func()->m_left = lens->d_func()->m_left;
+ d_func()->m_right = lens->d_func()->m_right;
+ d_func()->m_bottom = lens->d_func()->m_bottom;
+ d_func()->m_top = lens->d_func()->m_top;
+ d_func()->m_projectionMatrix = lens->d_func()->m_projectionMatrix;
}
QCameraLens::QCameraLens(QCameraLensPrivate &dd, QNode *parent)
diff --git a/src/core/core-components/qcameralens.h b/src/core/core-components/qcameralens.h
index 07f283046..a0640a9fd 100644
--- a/src/core/core-components/qcameralens.h
+++ b/src/core/core-components/qcameralens.h
@@ -130,6 +130,7 @@ Q_SIGNALS:
protected:
QCameraLens(QCameraLensPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QCameraLens)
diff --git a/src/core/core-components/qcameralens_p.h b/src/core/core-components/qcameralens_p.h
index d4dcb36c9..83fd9a922 100644
--- a/src/core/core-components/qcameralens_p.h
+++ b/src/core/core-components/qcameralens_p.h
@@ -58,8 +58,6 @@ class QT3DCORESHARED_EXPORT QCameraLensPrivate : public QComponentPrivate
public:
QCameraLensPrivate(QCameraLens *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
inline void updateProjectionMatrix()
{
switch (m_projectionType) {
diff --git a/src/core/nodes/qentity.cpp b/src/core/nodes/qentity.cpp
index 7de0c3a01..754038734 100644
--- a/src/core/nodes/qentity.cpp
+++ b/src/core/nodes/qentity.cpp
@@ -78,16 +78,16 @@ QEntity::QEntity(QEntityPrivate &dd, QNode *parent)
{
}
-void QEntityPrivate::copy(const QNodePrivate *ref)
+void QEntity::copy(const QNode *ref)
{
- QNodePrivate::copy(ref);
- const QEntityPrivate *entity = static_cast<const QEntityPrivate *>(ref);
- m_enabled = entity->m_enabled;
- m_visible = entity->m_visible;
+ QNode::copy(ref);
+ const QEntity *entity = static_cast<const QEntity*>(ref);
+ d_func()->m_enabled = entity->d_func()->m_enabled;
+ d_func()->m_visible = entity->d_func()->m_visible;
- Q_FOREACH (QComponent *c, entity->m_components) {
+ Q_FOREACH (QComponent *c, entity->d_func()->m_components) {
QNode *ccclone = QNodePrivate::get(c)->clone();
- q_func()->addComponent(qobject_cast<QComponent *>(ccclone));
+ addComponent(qobject_cast<QComponent *>(ccclone));
}
}
diff --git a/src/core/nodes/qentity.h b/src/core/nodes/qentity.h
index a3998aa86..c6ee57b46 100644
--- a/src/core/nodes/qentity.h
+++ b/src/core/nodes/qentity.h
@@ -74,6 +74,7 @@ public:
protected:
QEntity(QEntityPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QEntity)
diff --git a/src/core/nodes/qentity_p.h b/src/core/nodes/qentity_p.h
index 20e51d251..e883aa93c 100644
--- a/src/core/nodes/qentity_p.h
+++ b/src/core/nodes/qentity_p.h
@@ -57,8 +57,6 @@ public :
Q_DECLARE_PUBLIC(QEntity)
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
ComponentList m_components;
bool m_visible;
diff --git a/src/core/nodes/qnode.cpp b/src/core/nodes/qnode.cpp
index f12c978e6..8583ee668 100644
--- a/src/core/nodes/qnode.cpp
+++ b/src/core/nodes/qnode.cpp
@@ -68,13 +68,6 @@ QNodePrivate::QNodePrivate(QNode *qq)
q_ptr = qq;
}
-void QNodePrivate::copy(const QNodePrivate *ref)
-{
- if (ref != Q_NULLPTR) {
- m_uuid = ref->m_uuid;
- }
-}
-
// Called by QEvent::childAdded
void QNodePrivate::addChild(QNode *childNode)
{
@@ -341,8 +334,8 @@ QNode::QNode(QNodePrivate &dd, QNode *parent)
void QNode::copy(const QNode *ref)
{
- if (ref != Q_NULLPTR)
- d_func()->copy(QNodePrivate::get(const_cast<QNode *>(ref)));
+ if (ref)
+ d_func()->m_uuid = ref->d_func()->m_uuid;
}
QNode::~QNode()
diff --git a/src/core/nodes/qnode_p.h b/src/core/nodes/qnode_p.h
index 1892f5038..be8cdf1b9 100644
--- a/src/core/nodes/qnode_p.h
+++ b/src/core/nodes/qnode_p.h
@@ -64,9 +64,6 @@ public:
// Clone should only be made in the main thread
QNode *clone();
- virtual void copy(const QNodePrivate *ref);
-
-
void setScene(QSceneInterface *scene);
QSceneInterface *scene() const;
diff --git a/src/core/transforms/qlookattransform.cpp b/src/core/transforms/qlookattransform.cpp
index ff99d129d..e9f3cfc23 100644
--- a/src/core/transforms/qlookattransform.cpp
+++ b/src/core/transforms/qlookattransform.cpp
@@ -57,15 +57,15 @@ QLookAtTransform::QLookAtTransform(QNode *parent)
{
}
-void QLookAtTransformPrivate::copy(const QNodePrivate *ref)
+void QLookAtTransform::copy(const QNode *ref)
{
- QAbstractTransformPrivate::copy(ref);
- const QLookAtTransformPrivate *transform = static_cast<const QLookAtTransformPrivate *>(ref);
- m_matrix = transform->m_matrix;
- m_position = transform->m_position;
- m_upVector = transform->m_upVector;
- m_viewCenter = transform->m_viewCenter;
- m_viewVector = transform->m_viewVector;
+ QAbstractTransform::copy(ref);
+ const QLookAtTransform *transform = static_cast<const QLookAtTransform*>(ref);
+ d_func()->m_matrix = transform->d_func()->m_matrix;
+ d_func()->m_position = transform->d_func()->m_position;
+ d_func()->m_upVector = transform->d_func()->m_upVector;
+ d_func()->m_viewCenter = transform->d_func()->m_viewCenter;
+ d_func()->m_viewVector = transform->d_func()->m_viewVector;
}
QLookAtTransform::QLookAtTransform(QLookAtTransformPrivate &dd, QNode *parent)
diff --git a/src/core/transforms/qlookattransform.h b/src/core/transforms/qlookattransform.h
index 6246bd764..d0fb785d4 100644
--- a/src/core/transforms/qlookattransform.h
+++ b/src/core/transforms/qlookattransform.h
@@ -85,9 +85,12 @@ Q_SIGNALS:
void viewVectorChanged();
protected:
- Q_DECLARE_PRIVATE(QLookAtTransform)
QLookAtTransform(QLookAtTransformPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
+private:
QT3D_CLONEABLE(QLookAtTransform)
+ Q_DECLARE_PRIVATE(QLookAtTransform)
};
} // namespace Qt3D
diff --git a/src/core/transforms/qlookattransform_p.h b/src/core/transforms/qlookattransform_p.h
index f377afabc..2a6e71d51 100644
--- a/src/core/transforms/qlookattransform_p.h
+++ b/src/core/transforms/qlookattransform_p.h
@@ -55,8 +55,6 @@ public :
Q_DECLARE_PUBLIC(QLookAtTransform)
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
mutable QMatrix4x4 m_matrix;
QVector3D m_position;
QVector3D m_upVector;
diff --git a/src/core/transforms/qmatrixtransform.cpp b/src/core/transforms/qmatrixtransform.cpp
index c7240ff32..8e1aa648d 100644
--- a/src/core/transforms/qmatrixtransform.cpp
+++ b/src/core/transforms/qmatrixtransform.cpp
@@ -56,11 +56,11 @@ QMatrixTransform::QMatrixTransform(QMatrixTransformPrivate &dd, QNode *parent)
{
}
-void QMatrixTransformPrivate::copy(const QNodePrivate *ref)
+void QMatrixTransform::copy(const QNode *ref)
{
- QAbstractTransformPrivate::copy(ref);
- const QMatrixTransformPrivate *matrix = static_cast<const QMatrixTransformPrivate *>(ref);
- m_matrix = matrix->m_matrix;
+ QAbstractTransform::copy(ref);
+ const QMatrixTransform *matrix = static_cast<const QMatrixTransform*>(ref);
+ d_func()->m_matrix = matrix->d_func()->m_matrix;
}
QMatrixTransform::QMatrixTransform(QNode *parent)
diff --git a/src/core/transforms/qmatrixtransform.h b/src/core/transforms/qmatrixtransform.h
index d1320d995..f278dddcd 100644
--- a/src/core/transforms/qmatrixtransform.h
+++ b/src/core/transforms/qmatrixtransform.h
@@ -70,9 +70,12 @@ Q_SIGNALS:
void matrixChanged();
protected:
- Q_DECLARE_PRIVATE(QMatrixTransform)
QMatrixTransform(QMatrixTransformPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
+private:
QT3D_CLONEABLE(QMatrixTransform)
+ Q_DECLARE_PRIVATE(QMatrixTransform)
};
} // namespace Qt3D
diff --git a/src/core/transforms/qmatrixtransform_p.h b/src/core/transforms/qmatrixtransform_p.h
index fc0ad3a96..7be1e972a 100644
--- a/src/core/transforms/qmatrixtransform_p.h
+++ b/src/core/transforms/qmatrixtransform_p.h
@@ -55,8 +55,6 @@ class QMatrixTransformPrivate : public QAbstractTransformPrivate
public:
QMatrixTransformPrivate(QMatrixTransform *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QMatrixTransform)
QMatrix4x4 m_matrix;
};
diff --git a/src/core/transforms/qrotatetransform.cpp b/src/core/transforms/qrotatetransform.cpp
index 701153902..31927545b 100644
--- a/src/core/transforms/qrotatetransform.cpp
+++ b/src/core/transforms/qrotatetransform.cpp
@@ -60,12 +60,12 @@ QRotateTransformPrivate::QRotateTransformPrivate(QRotateTransform *qq)
{
}
-void QRotateTransformPrivate::copy(const QNodePrivate *ref)
+void QRotateTransform::copy(const QNode *ref)
{
- QAbstractTransformPrivate::copy(ref);
- const QRotateTransformPrivate *transform = static_cast<const QRotateTransformPrivate *>(ref);
- m_axis = transform->m_axis;
- m_angleDeg = transform->m_angleDeg;
+ QAbstractTransform::copy(ref);
+ const QRotateTransform *transform = static_cast<const QRotateTransform*>(ref);
+ d_func()->m_axis = transform->d_func()->m_axis;
+ d_func()->m_angleDeg = transform->d_func()->m_angleDeg;
}
QRotateTransform::QRotateTransform(QNode *parent)
diff --git a/src/core/transforms/qrotatetransform.h b/src/core/transforms/qrotatetransform.h
index 9a5e7e7bb..3c1240529 100644
--- a/src/core/transforms/qrotatetransform.h
+++ b/src/core/transforms/qrotatetransform.h
@@ -79,6 +79,7 @@ Q_SIGNALS:
protected:
QRotateTransform(QRotateTransformPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QRotateTransform)
diff --git a/src/core/transforms/qrotatetransform_p.h b/src/core/transforms/qrotatetransform_p.h
index 765fb5ba0..e4e2cf9df 100644
--- a/src/core/transforms/qrotatetransform_p.h
+++ b/src/core/transforms/qrotatetransform_p.h
@@ -57,8 +57,6 @@ public:
Q_DECLARE_PUBLIC(QRotateTransform)
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
float m_angleDeg;
QVector3D m_axis;
};
diff --git a/src/core/transforms/qscaletransform.cpp b/src/core/transforms/qscaletransform.cpp
index 94a7298bf..626179d7a 100644
--- a/src/core/transforms/qscaletransform.cpp
+++ b/src/core/transforms/qscaletransform.cpp
@@ -53,11 +53,11 @@ QScaleTransformPrivate::QScaleTransformPrivate(QScaleTransform *qq)
{
}
-void QScaleTransformPrivate::copy(const QNodePrivate *ref)
+void QScaleTransform::copy(const QNode *ref)
{
- QAbstractTransformPrivate::copy(ref);
- const QScaleTransformPrivate *transform = static_cast<const QScaleTransformPrivate *>(ref);
- m_scale3D = transform->m_scale3D;
+ QAbstractTransform::copy(ref);
+ const QScaleTransform *transform = static_cast<const QScaleTransform*>(ref);
+ d_func()->m_scale3D = transform->d_func()->m_scale3D;
}
QScaleTransform::QScaleTransform(QNode *parent) :
diff --git a/src/core/transforms/qscaletransform.h b/src/core/transforms/qscaletransform.h
index fde2fc6e2..d82cacac9 100644
--- a/src/core/transforms/qscaletransform.h
+++ b/src/core/transforms/qscaletransform.h
@@ -73,6 +73,7 @@ Q_SIGNALS:
protected:
QScaleTransform(QScaleTransformPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QScaleTransform)
diff --git a/src/core/transforms/qscaletransform_p.h b/src/core/transforms/qscaletransform_p.h
index 63f6afa62..c631b6b54 100644
--- a/src/core/transforms/qscaletransform_p.h
+++ b/src/core/transforms/qscaletransform_p.h
@@ -54,8 +54,6 @@ class QScaleTransformPrivate : public QAbstractTransformPrivate
public:
QScaleTransformPrivate(QScaleTransform *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QScaleTransform)
QVector3D m_scale3D;
};
diff --git a/src/core/transforms/qtransform.cpp b/src/core/transforms/qtransform.cpp
index 17fea861a..96226c08e 100644
--- a/src/core/transforms/qtransform.cpp
+++ b/src/core/transforms/qtransform.cpp
@@ -58,13 +58,13 @@ QTransformPrivate::QTransformPrivate(QTransform *qq)
{
}
-void QTransformPrivate::copy(const QNodePrivate *ref)
+void QTransform::copy(const QNode *ref)
{
- QComponentPrivate::copy(ref);
- const QTransformPrivate *transform = static_cast<const QTransformPrivate *>(ref);
- m_matrix = transform->m_matrix;
- Q_FOREACH (QAbstractTransform *t, transform->m_transforms)
- q_func()->appendTransform(qobject_cast<QAbstractTransform *>(QNodePrivate::get(t)->clone()));
+ QComponent::copy(ref);
+ const QTransform *transform = static_cast<const QTransform*>(ref);
+ d_func()->m_matrix = transform->d_func()->m_matrix;
+ Q_FOREACH (QAbstractTransform *t, transform->d_func()->m_transforms)
+ appendTransform(qobject_cast<QAbstractTransform *>(QNodePrivate::get(t)->clone()));
}
QTransform::QTransform(QNode *parent)
diff --git a/src/core/transforms/qtransform.h b/src/core/transforms/qtransform.h
index e9342e955..0c330c522 100644
--- a/src/core/transforms/qtransform.h
+++ b/src/core/transforms/qtransform.h
@@ -94,7 +94,9 @@ Q_SIGNALS:
protected:
QMatrix4x4 applyTransforms() const;
QList<QAbstractTransform *> transformList() const;
+
QTransform(QTransformPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QTransform)
diff --git a/src/core/transforms/qtransform_p.h b/src/core/transforms/qtransform_p.h
index f8b03dfb1..ebd490fe0 100644
--- a/src/core/transforms/qtransform_p.h
+++ b/src/core/transforms/qtransform_p.h
@@ -56,8 +56,6 @@ class QTransformPrivate : public QComponentPrivate
public:
QTransformPrivate(QTransform *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QTransform)
mutable QAtomicInt m_transformsDirty;
diff --git a/src/core/transforms/qtranslatetransform.cpp b/src/core/transforms/qtranslatetransform.cpp
index e809efa57..c7b271e4c 100644
--- a/src/core/transforms/qtranslatetransform.cpp
+++ b/src/core/transforms/qtranslatetransform.cpp
@@ -57,11 +57,11 @@ QTranslateTransform::QTranslateTransform(QNode *parent)
{
}
-void QTranslateTransformPrivate::copy(const QNodePrivate *ref)
+void QTranslateTransform::copy(const QNode *ref)
{
- QAbstractTransformPrivate::copy(ref);
- const QTranslateTransformPrivate *transform = static_cast<const QTranslateTransformPrivate *>(ref);
- m_translation = transform->m_translation;
+ QAbstractTransform::copy(ref);
+ const QTranslateTransform *transform = static_cast<const QTranslateTransform*>(ref);
+ d_func()->m_translation = transform->d_func()->m_translation;
}
diff --git a/src/core/transforms/qtranslatetransform.h b/src/core/transforms/qtranslatetransform.h
index ad3ab397a..01e55e926 100644
--- a/src/core/transforms/qtranslatetransform.h
+++ b/src/core/transforms/qtranslatetransform.h
@@ -85,6 +85,7 @@ Q_SIGNALS:
protected:
QTranslateTransform(QTranslateTransformPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QTranslateTransform)
diff --git a/src/core/transforms/qtranslatetransform_p.h b/src/core/transforms/qtranslatetransform_p.h
index 18a8d3d7e..4c942c644 100644
--- a/src/core/transforms/qtranslatetransform_p.h
+++ b/src/core/transforms/qtranslatetransform_p.h
@@ -55,8 +55,6 @@ public:
QTranslateTransformPrivate(QTranslateTransform *qq);
Q_DECLARE_PUBLIC(QTranslateTransform)
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
QVector3D m_translation;
};
diff --git a/src/render/frontend/framegraph-components/qcameraselector.cpp b/src/render/frontend/framegraph-components/qcameraselector.cpp
index 4c84bb700..43f35232b 100644
--- a/src/render/frontend/framegraph-components/qcameraselector.cpp
+++ b/src/render/frontend/framegraph-components/qcameraselector.cpp
@@ -59,15 +59,15 @@ QCameraSelectorPrivate::QCameraSelectorPrivate(Qt3D::QCameraSelector *qq)
, m_camera(Q_NULLPTR)
{}
-void QCameraSelectorPrivate::copy(const QNodePrivate *ref)
+void QCameraSelector::copy(const QNode *ref)
{
- QFrameGraphItemPrivate::copy(ref);
- const QCameraSelectorPrivate *other = static_cast<const QCameraSelectorPrivate*>(ref);
- Q_FOREACH (QFrameGraphItem *fgChild, other->m_fgChildren)
- q_func()->appendFrameGraphItem(qobject_cast<QFrameGraphItem *>(QNodePrivate::get(fgChild)->clone()));
+ QFrameGraphItem::copy(ref);
+ const QCameraSelector *other = static_cast<const QCameraSelector*>(ref);
+ Q_FOREACH (QFrameGraphItem *fgChild, other->d_func()->m_fgChildren)
+ appendFrameGraphItem(qobject_cast<QFrameGraphItem *>(QNodePrivate::get(fgChild)->clone()));
- if (other->m_camera != Q_NULLPTR)
- q_func()->setCamera(qobject_cast<QEntity *>(QNodePrivate::get(other->m_camera)->clone()));
+ if (other->d_func()->m_camera)
+ setCamera(qobject_cast<QEntity *>(QNodePrivate::get(other->d_func()->m_camera)->clone()));
}
QCameraSelector::QCameraSelector(Qt3D::QNode *parent)
diff --git a/src/render/frontend/framegraph-components/qcameraselector.h b/src/render/frontend/framegraph-components/qcameraselector.h
index 01723ed6c..ba7c37226 100644
--- a/src/render/frontend/framegraph-components/qcameraselector.h
+++ b/src/render/frontend/framegraph-components/qcameraselector.h
@@ -67,9 +67,12 @@ Q_SIGNALS:
void cameraChanged();
protected:
- Q_DECLARE_PRIVATE(QCameraSelector)
QCameraSelector(QCameraSelectorPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
+private:
QT3D_CLONEABLE(QCameraSelector)
+ Q_DECLARE_PRIVATE(QCameraSelector)
};
} // namespace Qt3D
diff --git a/src/render/frontend/framegraph-components/qcameraselector_p.h b/src/render/frontend/framegraph-components/qcameraselector_p.h
index 47f9ea6f0..077fb131d 100644
--- a/src/render/frontend/framegraph-components/qcameraselector_p.h
+++ b/src/render/frontend/framegraph-components/qcameraselector_p.h
@@ -55,7 +55,6 @@ class QCameraSelectorPrivate : public QFrameGraphItemPrivate
{
public:
QCameraSelectorPrivate(QCameraSelector *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
Q_DECLARE_PUBLIC(QCameraSelector)
QEntity *m_camera;
diff --git a/src/render/frontend/framegraph-components/qclearbuffer.cpp b/src/render/frontend/framegraph-components/qclearbuffer.cpp
index bbf006e1f..75557d75d 100644
--- a/src/render/frontend/framegraph-components/qclearbuffer.cpp
+++ b/src/render/frontend/framegraph-components/qclearbuffer.cpp
@@ -53,14 +53,14 @@ QClearBufferPrivate::QClearBufferPrivate(QClearBuffer *qq)
{
}
-void QClearBufferPrivate::copy(const QNodePrivate *ref)
+void QClearBuffer::copy(const QNode *ref)
{
- QFrameGraphItemPrivate::copy(ref);
- const QClearBufferPrivate *b = static_cast<const QClearBufferPrivate *>(ref);
- m_buffersType = b->m_buffersType;
+ QFrameGraphItem::copy(ref);
+ const QClearBuffer *b = static_cast<const QClearBuffer*>(ref);
+ d_func()->m_buffersType = b->d_func()->m_buffersType;
- Q_FOREACH (QFrameGraphItem *fgChild, b->m_fgChildren)
- q_func()->appendFrameGraphItem(qobject_cast<QFrameGraphItem *>(QNodePrivate::get(fgChild)->clone()));
+ Q_FOREACH (QFrameGraphItem *fgChild, b->d_func()->m_fgChildren)
+ appendFrameGraphItem(qobject_cast<QFrameGraphItem *>(QNodePrivate::get(fgChild)->clone()));
}
QClearBuffer::QClearBuffer(QNode *parent)
diff --git a/src/render/frontend/framegraph-components/qclearbuffer.h b/src/render/frontend/framegraph-components/qclearbuffer.h
index 15d60d492..4b177a329 100644
--- a/src/render/frontend/framegraph-components/qclearbuffer.h
+++ b/src/render/frontend/framegraph-components/qclearbuffer.h
@@ -77,6 +77,7 @@ Q_SIGNALS:
protected:
QClearBuffer(QClearBufferPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QClearBuffer)
diff --git a/src/render/frontend/framegraph-components/qclearbuffer_p.h b/src/render/frontend/framegraph-components/qclearbuffer_p.h
index eb6a064c1..ba5bf1a80 100644
--- a/src/render/frontend/framegraph-components/qclearbuffer_p.h
+++ b/src/render/frontend/framegraph-components/qclearbuffer_p.h
@@ -54,8 +54,6 @@ class QClearBufferPrivate : public QFrameGraphItemPrivate
public:
QClearBufferPrivate(QClearBuffer *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QClearBuffer)
QClearBuffer::BufferType m_buffersType;
};
diff --git a/src/render/frontend/framegraph-components/qframegraph.cpp b/src/render/frontend/framegraph-components/qframegraph.cpp
index 4cf9d1944..499375fbd 100644
--- a/src/render/frontend/framegraph-components/qframegraph.cpp
+++ b/src/render/frontend/framegraph-components/qframegraph.cpp
@@ -56,11 +56,11 @@ QFrameGraphPrivate::QFrameGraphPrivate(QFrameGraph *qq)
}
-void QFrameGraphPrivate::copy(const QNodePrivate *ref)
+void QFrameGraph::copy(const QNode *ref)
{
- QComponentPrivate::copy(ref);
- const QFrameGraphPrivate *other = static_cast<const QFrameGraphPrivate *>(ref);
- q_func()->setActiveFrameGraph(qobject_cast<QFrameGraphItem *>(QNodePrivate::get(other->m_activeFrameGraph)->clone()));
+ QComponent::copy(ref);
+ const QFrameGraph *other = static_cast<const QFrameGraph*>(ref);
+ setActiveFrameGraph(qobject_cast<QFrameGraphItem *>(QNodePrivate::get(other->d_func()->m_activeFrameGraph)->clone()));
}
/*!
diff --git a/src/render/frontend/framegraph-components/qframegraph.h b/src/render/frontend/framegraph-components/qframegraph.h
index 798cd0ca1..db7ace73b 100644
--- a/src/render/frontend/framegraph-components/qframegraph.h
+++ b/src/render/frontend/framegraph-components/qframegraph.h
@@ -71,6 +71,7 @@ Q_SIGNALS:
protected:
QFrameGraph(QFrameGraphPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QFrameGraph)
diff --git a/src/render/frontend/framegraph-components/qframegraph_p.h b/src/render/frontend/framegraph-components/qframegraph_p.h
index f7ce12ad8..aacf641a5 100644
--- a/src/render/frontend/framegraph-components/qframegraph_p.h
+++ b/src/render/frontend/framegraph-components/qframegraph_p.h
@@ -56,7 +56,6 @@ class QFrameGraphPrivate : public QComponentPrivate
{
public:
QFrameGraphPrivate(QFrameGraph *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
Q_DECLARE_PUBLIC(QFrameGraph)
diff --git a/src/render/frontend/framegraph-components/qframegraphitem.cpp b/src/render/frontend/framegraph-components/qframegraphitem.cpp
index 684772c4b..82f430610 100644
--- a/src/render/frontend/framegraph-components/qframegraphitem.cpp
+++ b/src/render/frontend/framegraph-components/qframegraphitem.cpp
@@ -64,9 +64,9 @@ QFrameGraphItemPrivate::QFrameGraphItemPrivate(QFrameGraphItem *qq)
{
}
-void QFrameGraphItemPrivate::copy(const QNodePrivate *ref)
+void QFrameGraphItem::copy(const QNode *ref)
{
- QNodePrivate::copy(ref);
+ QNode::copy(ref);
}
QFrameGraphItem::QFrameGraphItem(QNode *parent)
diff --git a/src/render/frontend/framegraph-components/qframegraphitem.h b/src/render/frontend/framegraph-components/qframegraphitem.h
index 857914649..9715f6fc7 100644
--- a/src/render/frontend/framegraph-components/qframegraphitem.h
+++ b/src/render/frontend/framegraph-components/qframegraphitem.h
@@ -64,6 +64,7 @@ public:
protected:
QFrameGraphItem(QFrameGraphItemPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QFrameGraphItem)
diff --git a/src/render/frontend/framegraph-components/qframegraphitem_p.h b/src/render/frontend/framegraph-components/qframegraphitem_p.h
index 3dbae8a16..c889eba7d 100644
--- a/src/render/frontend/framegraph-components/qframegraphitem_p.h
+++ b/src/render/frontend/framegraph-components/qframegraphitem_p.h
@@ -57,8 +57,6 @@ class QFrameGraphItemPrivate : public QNodePrivate
public:
QFrameGraphItemPrivate(QFrameGraphItem *qq);
- virtual void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QFrameGraphItem)
bool m_enabled;
QList<QFrameGraphItem *> m_fgChildren;
diff --git a/src/render/frontend/framegraph-components/qlayerfilter.cpp b/src/render/frontend/framegraph-components/qlayerfilter.cpp
index 088c85121..3ccf77b1d 100644
--- a/src/render/frontend/framegraph-components/qlayerfilter.cpp
+++ b/src/render/frontend/framegraph-components/qlayerfilter.cpp
@@ -52,13 +52,13 @@ QLayerFilterPrivate::QLayerFilterPrivate(QLayerFilter *qq)
{
}
-void QLayerFilterPrivate::copy(const QNodePrivate *ref)
+void QLayerFilter::copy(const QNode *ref)
{
- QFrameGraphItemPrivate::copy(ref);
- const QLayerFilterPrivate *layer = static_cast<const QLayerFilterPrivate *>(ref);
- m_layers = layer->m_layers;
- Q_FOREACH (QFrameGraphItem *fgChild, layer->m_fgChildren)
- q_func()->appendFrameGraphItem(qobject_cast<QFrameGraphItem *>(QNodePrivate::get(fgChild)->clone()));
+ QFrameGraphItem::copy(ref);
+ const QLayerFilter *layer = static_cast<const QLayerFilter*>(ref);
+ d_func()->m_layers = layer->d_func()->m_layers;
+ Q_FOREACH (QFrameGraphItem *fgChild, layer->d_func()->m_fgChildren)
+ appendFrameGraphItem(qobject_cast<QFrameGraphItem *>(QNodePrivate::get(fgChild)->clone()));
}
QLayerFilter::QLayerFilter(QNode *parent)
diff --git a/src/render/frontend/framegraph-components/qlayerfilter.h b/src/render/frontend/framegraph-components/qlayerfilter.h
index 304e96121..13b896e97 100644
--- a/src/render/frontend/framegraph-components/qlayerfilter.h
+++ b/src/render/frontend/framegraph-components/qlayerfilter.h
@@ -66,6 +66,7 @@ Q_SIGNALS:
protected:
QLayerFilter(QLayerFilterPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QLayerFilter)
diff --git a/src/render/frontend/framegraph-components/qlayerfilter_p.h b/src/render/frontend/framegraph-components/qlayerfilter_p.h
index 56f3a988e..32405fff6 100644
--- a/src/render/frontend/framegraph-components/qlayerfilter_p.h
+++ b/src/render/frontend/framegraph-components/qlayerfilter_p.h
@@ -56,8 +56,6 @@ class QT3DRENDERERSHARED_EXPORT QLayerFilterPrivate : public QFrameGraphItemPriv
public:
explicit QLayerFilterPrivate(QLayerFilter *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QLayerFilter)
QStringList m_layers;
};
diff --git a/src/render/frontend/framegraph-components/qrenderpassfilter.cpp b/src/render/frontend/framegraph-components/qrenderpassfilter.cpp
index 530e09783..1c186adfd 100644
--- a/src/render/frontend/framegraph-components/qrenderpassfilter.cpp
+++ b/src/render/frontend/framegraph-components/qrenderpassfilter.cpp
@@ -99,14 +99,14 @@ void QRenderPassFilter::removeCriterion(QCriterion *criterion)
d->m_criteriaList.removeOne(criterion);
}
-void QRenderPassFilterPrivate::copy(const QNodePrivate *ref)
+void QRenderPassFilter::copy(const QNode *ref)
{
- QFrameGraphItemPrivate::copy(ref);
- const QRenderPassFilterPrivate *other = static_cast<const QRenderPassFilterPrivate*>(ref);
- Q_FOREACH (QFrameGraphItem *fgChild, other->m_fgChildren)
- q_func()->appendFrameGraphItem(qobject_cast<QFrameGraphItem *>(QNodePrivate::get(fgChild)->clone()));
- Q_FOREACH (QCriterion *c, other->m_criteriaList)
- q_func()->addCriterion(qobject_cast<QCriterion *>(QNodePrivate::get(c)->clone()));
+ QFrameGraphItem::copy(ref);
+ const QRenderPassFilter *other = static_cast<const QRenderPassFilter*>(ref);
+ Q_FOREACH (QFrameGraphItem *fgChild, other->d_func()->m_fgChildren)
+ appendFrameGraphItem(qobject_cast<QFrameGraphItem *>(QNodePrivate::get(fgChild)->clone()));
+ Q_FOREACH (QCriterion *c, other->d_func()->m_criteriaList)
+ addCriterion(qobject_cast<QCriterion *>(QNodePrivate::get(c)->clone()));
}
} // Qt3D
diff --git a/src/render/frontend/framegraph-components/qrenderpassfilter.h b/src/render/frontend/framegraph-components/qrenderpassfilter.h
index d2a4202ce..2258b3a3f 100644
--- a/src/render/frontend/framegraph-components/qrenderpassfilter.h
+++ b/src/render/frontend/framegraph-components/qrenderpassfilter.h
@@ -67,6 +67,7 @@ public:
protected:
QRenderPassFilter(QRenderPassFilterPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QRenderPassFilter)
diff --git a/src/render/frontend/framegraph-components/qrenderpassfilter_p.h b/src/render/frontend/framegraph-components/qrenderpassfilter_p.h
index 1b7207e34..3da27e1e2 100644
--- a/src/render/frontend/framegraph-components/qrenderpassfilter_p.h
+++ b/src/render/frontend/framegraph-components/qrenderpassfilter_p.h
@@ -56,7 +56,6 @@ public:
QRenderPassFilterPrivate(QRenderPassFilter *qq)
: QFrameGraphItemPrivate(qq)
{}
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
Q_DECLARE_PUBLIC(QRenderPassFilter)
QString m_renderPassName;
diff --git a/src/render/frontend/framegraph-components/qrendertargetselector.cpp b/src/render/frontend/framegraph-components/qrendertargetselector.cpp
index 54f43ee90..7f01794f7 100644
--- a/src/render/frontend/framegraph-components/qrendertargetselector.cpp
+++ b/src/render/frontend/framegraph-components/qrendertargetselector.cpp
@@ -55,16 +55,16 @@ QRenderTargetSelectorPrivate::QRenderTargetSelectorPrivate(QRenderTargetSelector
{
}
-void QRenderTargetSelectorPrivate::copy(const QNodePrivate *ref)
+void QRenderTargetSelector::copy(const QNode *ref)
{
- QFrameGraphItemPrivate::copy(ref);
+ QFrameGraphItem::copy(ref);
- const QRenderTargetSelectorPrivate *other = static_cast<const QRenderTargetSelectorPrivate*>(ref);
- Q_FOREACH (QFrameGraphItem *fgChild, other->m_fgChildren)
- q_func()->appendFrameGraphItem(qobject_cast<QFrameGraphItem *>(QNodePrivate::get(fgChild)->clone()));
+ const QRenderTargetSelector *other = static_cast<const QRenderTargetSelector*>(ref);
+ Q_FOREACH (QFrameGraphItem *fgChild, other->d_func()->m_fgChildren)
+ appendFrameGraphItem(qobject_cast<QFrameGraphItem *>(QNodePrivate::get(fgChild)->clone()));
- if (other->m_target != Q_NULLPTR)
- q_func()->setTarget(qobject_cast<QRenderTarget *>(QNodePrivate::get(other->m_target)->clone()));
+ if (other->d_func()->m_target)
+ setTarget(qobject_cast<QRenderTarget *>(QNodePrivate::get(other->d_func()->m_target)->clone()));
}
QRenderTargetSelector::QRenderTargetSelector(QNode *parent)
diff --git a/src/render/frontend/framegraph-components/qrendertargetselector.h b/src/render/frontend/framegraph-components/qrendertargetselector.h
index 504a0711f..8a86a311d 100644
--- a/src/render/frontend/framegraph-components/qrendertargetselector.h
+++ b/src/render/frontend/framegraph-components/qrendertargetselector.h
@@ -68,6 +68,7 @@ Q_SIGNALS:
protected:
QRenderTargetSelector(QRenderTargetSelectorPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QRenderTargetSelector)
diff --git a/src/render/frontend/framegraph-components/qrendertargetselector_p.h b/src/render/frontend/framegraph-components/qrendertargetselector_p.h
index 0d4e2acb7..285004952 100644
--- a/src/render/frontend/framegraph-components/qrendertargetselector_p.h
+++ b/src/render/frontend/framegraph-components/qrendertargetselector_p.h
@@ -55,7 +55,6 @@ class QRenderTargetSelectorPrivate : public QFrameGraphItemPrivate
{
public:
QRenderTargetSelectorPrivate(QRenderTargetSelector *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
Q_DECLARE_PUBLIC(QRenderTargetSelector)
QRenderTarget *m_target;
diff --git a/src/render/frontend/framegraph-components/qsortcriterion.cpp b/src/render/frontend/framegraph-components/qsortcriterion.cpp
index a2e7de7de..862c8e012 100644
--- a/src/render/frontend/framegraph-components/qsortcriterion.cpp
+++ b/src/render/frontend/framegraph-components/qsortcriterion.cpp
@@ -53,11 +53,11 @@ QSortCriterionPrivate::QSortCriterionPrivate(QSortCriterion *qq)
{
}
-void QSortCriterionPrivate::copy(const QNodePrivate *ref)
+void QSortCriterion::copy(const QNode *ref)
{
- QNodePrivate::copy(ref);
- const QSortCriterionPrivate *s = static_cast<const QSortCriterionPrivate *>(ref);
- m_sort = s->m_sort;
+ QNode::copy(ref);
+ const QSortCriterion *s = static_cast<const QSortCriterion*>(ref);
+ d_func()->m_sort = s->d_func()->m_sort;
}
QSortCriterion::QSortCriterion(QNode *parent)
diff --git a/src/render/frontend/framegraph-components/qsortcriterion.h b/src/render/frontend/framegraph-components/qsortcriterion.h
index 2bd5914bc..9f14591c1 100644
--- a/src/render/frontend/framegraph-components/qsortcriterion.h
+++ b/src/render/frontend/framegraph-components/qsortcriterion.h
@@ -73,6 +73,7 @@ Q_SIGNALS:
protected:
QSortCriterion(QSortCriterionPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
QT3D_CLONEABLE(QSortCriterion)
diff --git a/src/render/frontend/framegraph-components/qsortcriterion_p.h b/src/render/frontend/framegraph-components/qsortcriterion_p.h
index 1ba2e9271..bde637488 100644
--- a/src/render/frontend/framegraph-components/qsortcriterion_p.h
+++ b/src/render/frontend/framegraph-components/qsortcriterion_p.h
@@ -54,8 +54,6 @@ class QSortCriterionPrivate : public QNodePrivate
public:
QSortCriterionPrivate(QSortCriterion *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QSortCriterion)
QSortCriterion::SortType m_sort;
};
diff --git a/src/render/frontend/framegraph-components/qsortmethod.cpp b/src/render/frontend/framegraph-components/qsortmethod.cpp
index 741e0aced..ecc2fe78f 100644
--- a/src/render/frontend/framegraph-components/qsortmethod.cpp
+++ b/src/render/frontend/framegraph-components/qsortmethod.cpp
@@ -54,12 +54,12 @@ QSortMethodPrivate::QSortMethodPrivate(QSortMethod *qq)
{
}
-void QSortMethodPrivate::copy(const QNodePrivate *ref)
+void QSortMethod::copy(const QNode *ref)
{
- QFrameGraphItemPrivate::copy(ref);
- const QSortMethodPrivate *other = static_cast<const QSortMethodPrivate*>(ref);
- Q_FOREACH (QSortCriterion *c, other->m_criteria)
- q_func()->addCriterion(qobject_cast<QSortCriterion *>(QNodePrivate::get(c)->clone()));
+ QFrameGraphItem::copy(ref);
+ const QSortMethod *other = static_cast<const QSortMethod*>(ref);
+ Q_FOREACH (QSortCriterion *c, other->d_func()->m_criteria)
+ addCriterion(qobject_cast<QSortCriterion *>(QNodePrivate::get(c)->clone()));
}
QSortMethod::QSortMethod(QNode *parent)
diff --git a/src/render/frontend/framegraph-components/qsortmethod.h b/src/render/frontend/framegraph-components/qsortmethod.h
index fd53f4b7a..eaa0ad442 100644
--- a/src/render/frontend/framegraph-components/qsortmethod.h
+++ b/src/render/frontend/framegraph-components/qsortmethod.h
@@ -64,6 +64,7 @@ public:
protected:
QSortMethod(QSortMethodPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QSortMethod)
diff --git a/src/render/frontend/framegraph-components/qsortmethod_p.h b/src/render/frontend/framegraph-components/qsortmethod_p.h
index 551cb897d..6ef90b90f 100644
--- a/src/render/frontend/framegraph-components/qsortmethod_p.h
+++ b/src/render/frontend/framegraph-components/qsortmethod_p.h
@@ -55,7 +55,6 @@ class QSortMethodPrivate : public QFrameGraphItemPrivate
{
public:
QSortMethodPrivate(QSortMethod *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
Q_DECLARE_PUBLIC(QSortMethod)
QList<QSortCriterion *> m_criteria;
};
diff --git a/src/render/frontend/framegraph-components/qtechniquefilter.cpp b/src/render/frontend/framegraph-components/qtechniquefilter.cpp
index 71404b94c..7672c9e69 100644
--- a/src/render/frontend/framegraph-components/qtechniquefilter.cpp
+++ b/src/render/frontend/framegraph-components/qtechniquefilter.cpp
@@ -55,14 +55,14 @@ QTechniqueFilterPrivate::QTechniqueFilterPrivate(QTechniqueFilter *qq)
{
}
-void QTechniqueFilterPrivate::copy(const QNodePrivate *ref)
+void QTechniqueFilter::copy(const QNode *ref)
{
- QFrameGraphItemPrivate::copy(ref);
- const QTechniqueFilterPrivate *other = static_cast<const QTechniqueFilterPrivate*>(ref);
- Q_FOREACH (QFrameGraphItem *fgChild, other->m_fgChildren)
- q_func()->appendFrameGraphItem(qobject_cast<QFrameGraphItem *>(QNodePrivate::get(fgChild)->clone()));
- Q_FOREACH (QCriterion *crit, other->m_criteriaList)
- q_func()->addCriterion(qobject_cast<QCriterion *>(QNodePrivate::get(crit)->clone()));
+ QFrameGraphItem::copy(ref);
+ const QTechniqueFilter *other = static_cast<const QTechniqueFilter*>(ref);
+ Q_FOREACH (QFrameGraphItem *fgChild, other->d_func()->m_fgChildren)
+ appendFrameGraphItem(qobject_cast<QFrameGraphItem *>(QNodePrivate::get(fgChild)->clone()));
+ Q_FOREACH (QCriterion *crit, other->d_func()->m_criteriaList)
+ addCriterion(qobject_cast<QCriterion *>(QNodePrivate::get(crit)->clone()));
}
QTechniqueFilter::QTechniqueFilter(QNode *parent)
diff --git a/src/render/frontend/framegraph-components/qtechniquefilter.h b/src/render/frontend/framegraph-components/qtechniquefilter.h
index 00994b466..34e0c0176 100644
--- a/src/render/frontend/framegraph-components/qtechniquefilter.h
+++ b/src/render/frontend/framegraph-components/qtechniquefilter.h
@@ -64,6 +64,7 @@ public:
protected:
QTechniqueFilter(QTechniqueFilterPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QTechniqueFilter)
diff --git a/src/render/frontend/framegraph-components/qtechniquefilter_p.h b/src/render/frontend/framegraph-components/qtechniquefilter_p.h
index c642b38ed..edcc3c454 100644
--- a/src/render/frontend/framegraph-components/qtechniquefilter_p.h
+++ b/src/render/frontend/framegraph-components/qtechniquefilter_p.h
@@ -54,7 +54,6 @@ class QTechniqueFilterPrivate : public QFrameGraphItemPrivate
{
public :
QTechniqueFilterPrivate(QTechniqueFilter *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
Q_DECLARE_PUBLIC(QTechniqueFilter)
QList<QCriterion *> m_criteriaList;
diff --git a/src/render/frontend/framegraph-components/qviewport.cpp b/src/render/frontend/framegraph-components/qviewport.cpp
index 9894ff08e..bd9f5aa14 100644
--- a/src/render/frontend/framegraph-components/qviewport.cpp
+++ b/src/render/frontend/framegraph-components/qviewport.cpp
@@ -53,13 +53,13 @@ QViewportPrivate::QViewportPrivate(QViewport *qq) :
{
}
-void QViewportPrivate::copy(const QNodePrivate *ref)
+void QViewport::copy(const QNode *ref)
{
- QFrameGraphItemPrivate::copy(ref);
- const QViewportPrivate *viewport = static_cast<const QViewportPrivate *>(ref);
- m_rect = viewport->m_rect;
- Q_FOREACH (QFrameGraphItem *fgChild, viewport->m_fgChildren)
- q_func()->appendFrameGraphItem(qobject_cast<QFrameGraphItem *>(QNodePrivate::get(fgChild)->clone()));
+ QFrameGraphItem::copy(ref);
+ const QViewport *viewport = static_cast<const QViewport*>(ref);
+ d_func()->m_rect = viewport->d_func()->m_rect;
+ Q_FOREACH (QFrameGraphItem *fgChild, viewport->d_func()->m_fgChildren)
+ appendFrameGraphItem(qobject_cast<QFrameGraphItem *>(QNodePrivate::get(fgChild)->clone()));
}
QViewport::QViewport(QNode *parent)
diff --git a/src/render/frontend/framegraph-components/qviewport.h b/src/render/frontend/framegraph-components/qviewport.h
index ce2410e84..016ba24b0 100644
--- a/src/render/frontend/framegraph-components/qviewport.h
+++ b/src/render/frontend/framegraph-components/qviewport.h
@@ -73,6 +73,7 @@ Q_SIGNALS:
protected:
QViewport(QViewportPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QViewport)
diff --git a/src/render/frontend/framegraph-components/qviewport_p.h b/src/render/frontend/framegraph-components/qviewport_p.h
index 6281acaf3..e178c4f20 100644
--- a/src/render/frontend/framegraph-components/qviewport_p.h
+++ b/src/render/frontend/framegraph-components/qviewport_p.h
@@ -55,8 +55,6 @@ class QViewportPrivate : public QFrameGraphItemPrivate
public :
QViewportPrivate(QViewport *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QViewport)
QRectF m_rect;
QColor m_clearColor;
diff --git a/src/render/frontend/qabstractlight.cpp b/src/render/frontend/qabstractlight.cpp
index b74732851..6f356467c 100644
--- a/src/render/frontend/qabstractlight.cpp
+++ b/src/render/frontend/qabstractlight.cpp
@@ -61,12 +61,12 @@ QAbstractLightPrivate::QAbstractLightPrivate(QAbstractLight *qq)
, m_intensity(1.0f)
{}
-void QAbstractLightPrivate::copy(const QNodePrivate *ref)
+void QAbstractLight::copy(const QNode *ref)
{
- QComponentPrivate::copy(ref);
- const QAbstractLightPrivate *light = static_cast<const QAbstractLightPrivate *>(ref);
- m_color = light->m_color;
- m_intensity = light->m_intensity;
+ QComponent::copy(ref);
+ const QAbstractLight *light = static_cast<const QAbstractLight*>(ref);
+ d_func()->m_color = light->d_func()->m_color;
+ d_func()->m_intensity = light->d_func()->m_intensity;
}
/*!
diff --git a/src/render/frontend/qabstractlight.h b/src/render/frontend/qabstractlight.h
index 79c6b85d3..ccaaf7a19 100644
--- a/src/render/frontend/qabstractlight.h
+++ b/src/render/frontend/qabstractlight.h
@@ -81,12 +81,15 @@ public :
virtual const QString lightUniformName() const = 0;
protected :
- Q_DECLARE_PRIVATE(QAbstractLight)
QAbstractLight(QAbstractLightPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
Q_SIGNALS:
void colorChanged();
void intensityChanged();
+
+private:
+ Q_DECLARE_PRIVATE(QAbstractLight)
};
} // Qt3D
diff --git a/src/render/frontend/qabstractlight_p.h b/src/render/frontend/qabstractlight_p.h
index 2ef739db9..98d2837eb 100644
--- a/src/render/frontend/qabstractlight_p.h
+++ b/src/render/frontend/qabstractlight_p.h
@@ -56,8 +56,6 @@ class QT3DRENDERERSHARED_EXPORT QAbstractLightPrivate : public QComponentPrivate
public:
QAbstractLightPrivate(QAbstractLight *qq);
- virtual void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QAbstractLight)
QColor m_color;
float m_intensity;
diff --git a/src/render/frontend/qabstractsceneloader.cpp b/src/render/frontend/qabstractsceneloader.cpp
index 662b8d825..42ebd7308 100644
--- a/src/render/frontend/qabstractsceneloader.cpp
+++ b/src/render/frontend/qabstractsceneloader.cpp
@@ -68,10 +68,10 @@ QAbstractSceneLoader::QAbstractSceneLoader(QNode *parent)
{
}
-void QAbstractSceneLoaderPrivate::copy(const QNodePrivate *ref)
+void QAbstractSceneLoader::copy(const QNode *ref)
{
- const QAbstractSceneLoaderPrivate *s = static_cast<const QAbstractSceneLoaderPrivate *>(ref);
- m_source = s->m_source;
+ const QAbstractSceneLoader *s = static_cast<const QAbstractSceneLoader*>(ref);
+ d_func()->m_source = s->d_func()->m_source;
}
QString QAbstractSceneLoader::source() const
diff --git a/src/render/frontend/qabstractsceneloader.h b/src/render/frontend/qabstractsceneloader.h
index 8e22d1c2c..6a95dab68 100644
--- a/src/render/frontend/qabstractsceneloader.h
+++ b/src/render/frontend/qabstractsceneloader.h
@@ -82,8 +82,11 @@ Q_SIGNALS:
void statusChanged();
protected:
- Q_DECLARE_PRIVATE(QAbstractSceneLoader)
QAbstractSceneLoader(QAbstractSceneLoaderPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
+private:
+ Q_DECLARE_PRIVATE(QAbstractSceneLoader)
};
} // Render
diff --git a/src/render/frontend/qabstractsceneloader_p.h b/src/render/frontend/qabstractsceneloader_p.h
index edca8f116..6f58f85f8 100644
--- a/src/render/frontend/qabstractsceneloader_p.h
+++ b/src/render/frontend/qabstractsceneloader_p.h
@@ -60,8 +60,6 @@ class QT3DRENDERERSHARED_EXPORT QAbstractSceneLoaderPrivate : public QComponentP
public:
QAbstractSceneLoaderPrivate(QAbstractSceneLoader *qq);
- virtual void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QAbstractSceneLoader)
QString m_source;
diff --git a/src/render/frontend/qalphatest.cpp b/src/render/frontend/qalphatest.cpp
index de0837df3..886163ce1 100644
--- a/src/render/frontend/qalphatest.cpp
+++ b/src/render/frontend/qalphatest.cpp
@@ -59,8 +59,6 @@ public:
{
}
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QAlphaTest)
QAlphaTest::AlphaFunc m_func;
float m_clamp;
@@ -71,12 +69,12 @@ QAlphaTest::QAlphaTest(QNode *parent)
{
}
-void QAlphaTestPrivate::copy(const QNodePrivate *ref)
+void QAlphaTest::copy(const QNode *ref)
{
- QRenderStatePrivate::copy(ref);
- const QAlphaTestPrivate *refState = static_cast<const QAlphaTestPrivate *>(ref);
- m_func = refState->m_func;
- m_clamp = refState->m_clamp;
+ QRenderState::copy(ref);
+ const QAlphaTest *refState = static_cast<const QAlphaTest*>(ref);
+ d_func()->m_func = refState->d_func()->m_func;
+ d_func()->m_clamp = refState->d_func()->m_clamp;
}
QAlphaTest::AlphaFunc QAlphaTest::func() const
diff --git a/src/render/frontend/qalphatest.h b/src/render/frontend/qalphatest.h
index 0180e2074..2ee476c72 100644
--- a/src/render/frontend/qalphatest.h
+++ b/src/render/frontend/qalphatest.h
@@ -82,6 +82,9 @@ Q_SIGNALS:
void funcChanged();
void clampChanged();
+protected:
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
private:
Q_DECLARE_PRIVATE(QAlphaTest)
QT3D_CLONEABLE(QAlphaTest)
diff --git a/src/render/frontend/qblendequation.cpp b/src/render/frontend/qblendequation.cpp
index 450fab6ed..7179fc533 100644
--- a/src/render/frontend/qblendequation.cpp
+++ b/src/render/frontend/qblendequation.cpp
@@ -57,17 +57,15 @@ public:
{
}
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QBlendEquation)
QBlendEquation::BlendMode m_mode;
};
-void QBlendEquationPrivate::copy(const QNodePrivate *ref)
+void QBlendEquation::copy(const QNode *ref)
{
- QRenderStatePrivate::copy(ref);
- const QBlendEquationPrivate *refState = reinterpret_cast<const QBlendEquationPrivate *>(ref);
- m_mode = refState->m_mode;
+ QRenderState::copy(ref);
+ const QBlendEquation *refState = reinterpret_cast<const QBlendEquation*>(ref);
+ d_func()->m_mode = refState->d_func()->m_mode;
}
QBlendEquation::QBlendEquation(QNode *parent)
diff --git a/src/render/frontend/qblendequation.h b/src/render/frontend/qblendequation.h
index cdf683c9e..5635fd8a1 100644
--- a/src/render/frontend/qblendequation.h
+++ b/src/render/frontend/qblendequation.h
@@ -75,6 +75,9 @@ public:
Q_SIGNALS:
void modeChanged();
+protected:
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
private:
Q_DECLARE_PRIVATE(QBlendEquation)
QT3D_CLONEABLE(QBlendEquation)
diff --git a/src/render/frontend/qblendstate.cpp b/src/render/frontend/qblendstate.cpp
index d19a9b73f..5263480a4 100644
--- a/src/render/frontend/qblendstate.cpp
+++ b/src/render/frontend/qblendstate.cpp
@@ -61,8 +61,6 @@ public:
{
}
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QBlendState)
QBlendState::Blending m_srcRGB;
@@ -76,14 +74,14 @@ QBlendState::QBlendState(QNode *parent)
{
}
-void QBlendStatePrivate::copy(const QNodePrivate *ref)
+void QBlendState::copy(const QNode *ref)
{
- QRenderStatePrivate::copy(ref);
- const QBlendStatePrivate *refState = static_cast<const QBlendStatePrivate *>(ref);
- m_srcRGB = refState->m_srcRGB;
- m_srcAlpha = refState->m_srcAlpha;
- m_dstAlpha = refState->m_dstAlpha;
- m_dstRGB = refState->m_dstRGB;
+ QRenderState::copy(ref);
+ const QBlendState *refState = static_cast<const QBlendState*>(ref);
+ d_func()->m_srcRGB = refState->d_func()->m_srcRGB;
+ d_func()->m_srcAlpha = refState->d_func()->m_srcAlpha;
+ d_func()->m_dstAlpha = refState->d_func()->m_dstAlpha;
+ d_func()->m_dstRGB = refState->d_func()->m_dstRGB;
}
QBlendState::Blending QBlendState::srcRGB() const
diff --git a/src/render/frontend/qblendstate.h b/src/render/frontend/qblendstate.h
index 33d4d6a9e..5805ff8c4 100644
--- a/src/render/frontend/qblendstate.h
+++ b/src/render/frontend/qblendstate.h
@@ -105,6 +105,9 @@ Q_SIGNALS:
void dstRGBChanged();
void dstAlphaChanged();
+protected:
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
private:
Q_DECLARE_PRIVATE(QBlendState)
QT3D_CLONEABLE(QBlendState)
diff --git a/src/render/frontend/qcriterion.cpp b/src/render/frontend/qcriterion.cpp
index b7dc6ee74..71226e13e 100644
--- a/src/render/frontend/qcriterion.cpp
+++ b/src/render/frontend/qcriterion.cpp
@@ -54,12 +54,12 @@ QCriterionPrivate::QCriterionPrivate(QCriterion *qq)
{
}
-void QCriterionPrivate::copy(const QNodePrivate *ref)
+void QCriterion::copy(const QNode *ref)
{
- QNodePrivate::copy(ref);
- const QCriterionPrivate *criterion = static_cast<const QCriterionPrivate *>(ref);
- m_name = criterion->m_name;
- m_value = criterion->m_value;
+ QNode::copy(ref);
+ const QCriterion *criterion = static_cast<const QCriterion*>(ref);
+ d_func()->m_name = criterion->d_func()->m_name;
+ d_func()->m_value = criterion->d_func()->m_value;
}
QCriterion::QCriterion(QNode *parent)
diff --git a/src/render/frontend/qcriterion.h b/src/render/frontend/qcriterion.h
index eaa3c29e8..c31d5b6b1 100644
--- a/src/render/frontend/qcriterion.h
+++ b/src/render/frontend/qcriterion.h
@@ -70,6 +70,9 @@ Q_SIGNALS:
void nameChanged();
void valueChanged();
+protected:
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
private:
Q_DECLARE_PRIVATE(QCriterion)
QT3D_CLONEABLE(QCriterion)
diff --git a/src/render/frontend/qcriterion_p.h b/src/render/frontend/qcriterion_p.h
index e756984a2..fbe7c2dce 100644
--- a/src/render/frontend/qcriterion_p.h
+++ b/src/render/frontend/qcriterion_p.h
@@ -54,8 +54,6 @@ class QCriterionPrivate : public QNodePrivate
public:
QCriterionPrivate(QCriterion *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QCriterion)
QString m_name;
QVariant m_value;
diff --git a/src/render/frontend/qcuboidmesh.cpp b/src/render/frontend/qcuboidmesh.cpp
index eeb79528a..40b474e66 100644
--- a/src/render/frontend/qcuboidmesh.cpp
+++ b/src/render/frontend/qcuboidmesh.cpp
@@ -62,16 +62,16 @@ QCuboidMeshPrivate::QCuboidMeshPrivate(QCuboidMesh *qq)
{
}
-void QCuboidMeshPrivate::copy(const QNodePrivate *ref)
+void QCuboidMesh::copy(const QNode *ref)
{
- QAbstractShapeMeshPrivate::copy(ref);
- const QCuboidMeshPrivate *mesh = static_cast<const QCuboidMeshPrivate *>(ref);
- m_xExtent = mesh->m_xExtent;
- m_yExtent = mesh->m_yExtent;
- m_zExtent = mesh->m_zExtent;
- m_yzFaceResolution = mesh->m_yzFaceResolution;
- m_xzFaceResolution = mesh->m_xzFaceResolution;
- m_xyFaceResolution = mesh->m_xyFaceResolution;
+ QAbstractShapeMesh::copy(ref);
+ const QCuboidMesh *mesh = static_cast<const QCuboidMesh*>(ref);
+ d_func()->m_xExtent = mesh->d_func()->m_xExtent;
+ d_func()->m_yExtent = mesh->d_func()->m_yExtent;
+ d_func()->m_zExtent = mesh->d_func()->m_zExtent;
+ d_func()->m_yzFaceResolution = mesh->d_func()->m_yzFaceResolution;
+ d_func()->m_xzFaceResolution = mesh->d_func()->m_xzFaceResolution;
+ d_func()->m_xyFaceResolution = mesh->d_func()->m_xyFaceResolution;
}
QCuboidMesh::QCuboidMesh(QNode *parent)
diff --git a/src/render/frontend/qcuboidmesh.h b/src/render/frontend/qcuboidmesh.h
index 33b79050a..bf9318140 100644
--- a/src/render/frontend/qcuboidmesh.h
+++ b/src/render/frontend/qcuboidmesh.h
@@ -96,6 +96,7 @@ Q_SIGNALS:
protected:
QCuboidMesh(QCuboidMeshPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
QT3D_CLONEABLE(QCuboidMesh)
diff --git a/src/render/frontend/qcuboidmesh_p.h b/src/render/frontend/qcuboidmesh_p.h
index 9abd26ec6..02b5eff81 100644
--- a/src/render/frontend/qcuboidmesh_p.h
+++ b/src/render/frontend/qcuboidmesh_p.h
@@ -57,8 +57,6 @@ class QCuboidMeshPrivate : QAbstractShapeMeshPrivate
public:
QCuboidMeshPrivate(QCuboidMesh *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QCuboidMesh)
// Dimensions
diff --git a/src/render/frontend/qcullface.cpp b/src/render/frontend/qcullface.cpp
index 9972c66ae..feb43b37b 100644
--- a/src/render/frontend/qcullface.cpp
+++ b/src/render/frontend/qcullface.cpp
@@ -58,8 +58,6 @@ public:
{
}
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QCullFace)
QCullFace::CullingMode m_mode;
};
@@ -69,11 +67,11 @@ QCullFace::QCullFace(QNode *parent)
{
}
-void QCullFacePrivate::copy(const QNodePrivate *ref)
+void QCullFace::copy(const QNode *ref)
{
- QRenderStatePrivate::copy(ref);
- const QCullFacePrivate *refState = static_cast<const QCullFacePrivate *>(ref);
- m_mode = refState->m_mode;
+ QRenderState::copy(ref);
+ const QCullFace *refState = static_cast<const QCullFace*>(ref);
+ d_func()->m_mode = refState->d_func()->m_mode;
}
QCullFace::CullingMode QCullFace::mode() const
diff --git a/src/render/frontend/qcullface.h b/src/render/frontend/qcullface.h
index 98544376a..923e39e99 100644
--- a/src/render/frontend/qcullface.h
+++ b/src/render/frontend/qcullface.h
@@ -75,6 +75,9 @@ public:
Q_SIGNALS:
void modeChanged();
+protected:
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
private:
Q_DECLARE_PRIVATE(QCullFace)
QT3D_CLONEABLE(QCullFace)
diff --git a/src/render/frontend/qcylindermesh.cpp b/src/render/frontend/qcylindermesh.cpp
index da371db4d..dfcea7570 100644
--- a/src/render/frontend/qcylindermesh.cpp
+++ b/src/render/frontend/qcylindermesh.cpp
@@ -80,8 +80,6 @@ class QCylinderMeshPrivate : public QAbstractShapeMeshPrivate
, m_length(1.0)
{}
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QCylinderMesh)
int m_rings;
int m_slices;
@@ -89,14 +87,14 @@ class QCylinderMeshPrivate : public QAbstractShapeMeshPrivate
float m_length;
};
-void QCylinderMeshPrivate::copy(const QNodePrivate *ref)
+void QCylinderMesh::copy(const QNode *ref)
{
- QAbstractShapeMeshPrivate::copy(ref);
- const QCylinderMeshPrivate *mesh = static_cast<const QCylinderMeshPrivate *>(ref);
- m_rings = mesh->m_rings;
- m_slices = mesh->m_slices;
- m_radius = mesh->m_radius;
- m_length = mesh->m_length;
+ QAbstractShapeMesh::copy(ref);
+ const QCylinderMesh *mesh = static_cast<const QCylinderMesh*>(ref);
+ d_func()->m_rings = mesh->d_func()->m_rings;
+ d_func()->m_slices = mesh->d_func()->m_slices;
+ d_func()->m_radius = mesh->d_func()->m_radius;
+ d_func()->m_length = mesh->d_func()->m_length;
}
QCylinderMesh::QCylinderMesh(QNode *parent)
diff --git a/src/render/frontend/qcylindermesh.h b/src/render/frontend/qcylindermesh.h
index 17be25404..6e25de876 100644
--- a/src/render/frontend/qcylindermesh.h
+++ b/src/render/frontend/qcylindermesh.h
@@ -80,6 +80,9 @@ Q_SIGNALS:
void radiusChanged(float radius);
void lengthChanged(float length);
+protected:
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
private:
Q_DECLARE_PRIVATE(QCylinderMesh)
QT3D_CLONEABLE(QCylinderMesh)
diff --git a/src/render/frontend/qdepthmask.cpp b/src/render/frontend/qdepthmask.cpp
index bd0258089..d90d79988 100644
--- a/src/render/frontend/qdepthmask.cpp
+++ b/src/render/frontend/qdepthmask.cpp
@@ -58,8 +58,6 @@ public:
{
}
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QDepthMask)
bool m_mask;
};
@@ -69,11 +67,11 @@ QDepthMask::QDepthMask(QNode *parent)
{
}
-void QDepthMaskPrivate::copy(const QNodePrivate *ref)
+void QDepthMask::copy(const QNode *ref)
{
- QRenderStatePrivate::copy(ref);
- const QDepthMaskPrivate *refState = static_cast<const QDepthMaskPrivate *>(ref);
- m_mask = refState->m_mask;
+ QRenderState::copy(ref);
+ const QDepthMask *refState = static_cast<const QDepthMask*>(ref);
+ d_func()->m_mask = refState->d_func()->m_mask;
}
bool QDepthMask::mask() const
diff --git a/src/render/frontend/qdepthmask.h b/src/render/frontend/qdepthmask.h
index 88b1df4a4..95360a22c 100644
--- a/src/render/frontend/qdepthmask.h
+++ b/src/render/frontend/qdepthmask.h
@@ -64,6 +64,9 @@ public:
Q_SIGNALS:
void maskChanged();
+protected:
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
private:
Q_DECLARE_PRIVATE(QDepthMask)
QT3D_CLONEABLE(QDepthMask)
diff --git a/src/render/frontend/qdepthtest.cpp b/src/render/frontend/qdepthtest.cpp
index c99401339..d5d266268 100644
--- a/src/render/frontend/qdepthtest.cpp
+++ b/src/render/frontend/qdepthtest.cpp
@@ -60,17 +60,15 @@ public :
{
}
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QDepthTest)
QDepthTest::DepthFunc m_func;
};
-void QDepthTestPrivate::copy(const QNodePrivate *ref)
+void QDepthTest::copy(const QNode *ref)
{
- QRenderStatePrivate::copy(ref);
- const QDepthTestPrivate *refState = static_cast<const QDepthTestPrivate *>(ref);
- m_func = refState->m_func;
+ QRenderState::copy(ref);
+ const QDepthTest *refState = static_cast<const QDepthTest*>(ref);
+ d_func()->m_func = refState->d_func()->m_func;
}
QDepthTest::QDepthTest(QNode *parent)
diff --git a/src/render/frontend/qdepthtest.h b/src/render/frontend/qdepthtest.h
index 9f75efcbb..fa18ea86e 100644
--- a/src/render/frontend/qdepthtest.h
+++ b/src/render/frontend/qdepthtest.h
@@ -77,6 +77,9 @@ public:
Q_SIGNALS:
void funcChanged();
+protected:
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
private:
Q_DECLARE_PRIVATE(QDepthTest)
QT3D_CLONEABLE(QDepthTest)
diff --git a/src/render/frontend/qdirectionallight.cpp b/src/render/frontend/qdirectionallight.cpp
index 31a5f110a..b77f7637b 100644
--- a/src/render/frontend/qdirectionallight.cpp
+++ b/src/render/frontend/qdirectionallight.cpp
@@ -71,11 +71,11 @@ QDirectionalLightPrivate::QDirectionalLightPrivate(QDirectionalLight *qq)
{
}
-void QDirectionalLightPrivate::copy(const QNodePrivate *ref)
+void QDirectionalLight::copy(const QNode *ref)
{
- QAbstractLightPrivate::copy(ref);
- const QDirectionalLightPrivate *light = static_cast<const QDirectionalLightPrivate *>(ref);
- m_direction = light->m_direction;
+ QAbstractLight::copy(ref);
+ const QDirectionalLight *light = static_cast<const QDirectionalLight*>(ref);
+ d_func()->m_direction = light->d_func()->m_direction;
}
QDirectionalLight::QDirectionalLight(QNode *parent)
diff --git a/src/render/frontend/qdirectionallight.h b/src/render/frontend/qdirectionallight.h
index 420c1019b..137add318 100644
--- a/src/render/frontend/qdirectionallight.h
+++ b/src/render/frontend/qdirectionallight.h
@@ -70,6 +70,7 @@ Q_SIGNALS:
protected:
QDirectionalLight(QDirectionalLightPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QDirectionalLight)
diff --git a/src/render/frontend/qdirectionallight_p.h b/src/render/frontend/qdirectionallight_p.h
index 285adb45d..802d0241c 100644
--- a/src/render/frontend/qdirectionallight_p.h
+++ b/src/render/frontend/qdirectionallight_p.h
@@ -55,8 +55,6 @@ class QT3DRENDERERSHARED_EXPORT QDirectionalLightPrivate : QAbstractLightPrivate
public:
QDirectionalLightPrivate(QDirectionalLight *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QDirectionalLight)
QVector3D m_direction;
};
diff --git a/src/render/frontend/qeffect.cpp b/src/render/frontend/qeffect.cpp
index a9f5250a1..6da0ccc5e 100644
--- a/src/render/frontend/qeffect.cpp
+++ b/src/render/frontend/qeffect.cpp
@@ -59,15 +59,15 @@ QEffect::QEffect(QNode *parent)
{
}
-void QEffectPrivate::copy(const QNodePrivate *ref)
+void QEffect::copy(const QNode* ref)
{
- QNodePrivate::copy(ref);
- const QEffectPrivate *effect = static_cast<const QEffectPrivate*>(ref);
- Q_FOREACH (QParameter *p, effect->m_parameters)
- q_func()->addParameter(qobject_cast<QParameter *>(QNodePrivate::get(p)->clone()));
+ QNode::copy(ref);
+ const QEffect *effect = static_cast<const QEffect*>(ref);
+ Q_FOREACH (QParameter *p, effect->d_func()->m_parameters)
+ addParameter(qobject_cast<QParameter *>(QNodePrivate::get(p)->clone()));
- Q_FOREACH (QTechnique *t, effect->m_techniques)
- q_func()->addTechnique(qobject_cast<QTechnique *>(QNodePrivate::get(t)->clone()));
+ Q_FOREACH (QTechnique *t, effect->d_func()->m_techniques)
+ addTechnique(qobject_cast<QTechnique *>(QNodePrivate::get(t)->clone()));
}
QEffect::QEffect(QEffectPrivate &dd, QNode *parent)
diff --git a/src/render/frontend/qeffect.h b/src/render/frontend/qeffect.h
index 05192dd2b..a77a2f9d7 100644
--- a/src/render/frontend/qeffect.h
+++ b/src/render/frontend/qeffect.h
@@ -70,6 +70,7 @@ public:
protected:
QEffect(QEffectPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QEffect)
diff --git a/src/render/frontend/qeffect_p.h b/src/render/frontend/qeffect_p.h
index 4446dd81e..353bbe719 100644
--- a/src/render/frontend/qeffect_p.h
+++ b/src/render/frontend/qeffect_p.h
@@ -58,8 +58,6 @@ class QT3DRENDERERSHARED_EXPORT QEffectPrivate : public QNodePrivate
public :
QEffectPrivate(QEffect *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QEffect)
QList<QParameter *> m_parameters;
QList<QTechnique *> m_techniques;
diff --git a/src/render/frontend/qfrontface.cpp b/src/render/frontend/qfrontface.cpp
index 8d60857e7..8b4d51383 100644
--- a/src/render/frontend/qfrontface.cpp
+++ b/src/render/frontend/qfrontface.cpp
@@ -58,8 +58,6 @@ public:
{
}
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QFrontFace)
QFrontFace::FaceDir m_direction;
};
@@ -69,11 +67,11 @@ QFrontFace::QFrontFace(QNode *parent)
{
}
-void QFrontFacePrivate::copy(const QNodePrivate *ref)
+void QFrontFace::copy(const QNode *ref)
{
- QRenderStatePrivate::copy(ref);
- const QFrontFacePrivate *refState = static_cast<const QFrontFacePrivate *>(ref);
- m_direction = refState->m_direction;
+ QRenderState::copy(ref);
+ const QFrontFace *refState = static_cast<const QFrontFace*>(ref);
+ d_func()->m_direction = refState->d_func()->m_direction;
}
QFrontFace::FaceDir QFrontFace::direction() const
diff --git a/src/render/frontend/qfrontface.h b/src/render/frontend/qfrontface.h
index 5160a553d..f168e84a8 100644
--- a/src/render/frontend/qfrontface.h
+++ b/src/render/frontend/qfrontface.h
@@ -72,6 +72,9 @@ public:
Q_SIGNALS:
void directionChanged();
+protected:
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
private:
Q_DECLARE_PRIVATE(QFrontFace)
QT3D_CLONEABLE(QFrontFace)
diff --git a/src/render/frontend/qlayer.cpp b/src/render/frontend/qlayer.cpp
index 5c9f4de13..290d549ef 100644
--- a/src/render/frontend/qlayer.cpp
+++ b/src/render/frontend/qlayer.cpp
@@ -51,11 +51,11 @@ QLayerPrivate::QLayerPrivate(QLayer *qq)
{
}
-void QLayerPrivate::copy(const QNodePrivate *ref)
+void QLayer::copy(const QNode *ref)
{
- QComponentPrivate::copy(ref);
- const QLayerPrivate *layer = static_cast<const QLayerPrivate *>(ref);
- m_name = layer->m_name;
+ QComponent::copy(ref);
+ const QLayer *layer = static_cast<const QLayer*>(ref);
+ d_func()->m_name = layer->d_func()->m_name;
}
QLayer::QLayer(QNode *parent)
diff --git a/src/render/frontend/qlayer.h b/src/render/frontend/qlayer.h
index b5d79bb3f..d155870c1 100644
--- a/src/render/frontend/qlayer.h
+++ b/src/render/frontend/qlayer.h
@@ -66,6 +66,7 @@ Q_SIGNALS:
protected:
QLayer(QLayerPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QLayer)
diff --git a/src/render/frontend/qlayer_p.h b/src/render/frontend/qlayer_p.h
index e4863b7d2..89527761b 100644
--- a/src/render/frontend/qlayer_p.h
+++ b/src/render/frontend/qlayer_p.h
@@ -55,8 +55,6 @@ class QT3DRENDERERSHARED_EXPORT QLayerPrivate : QComponentPrivate
public:
QLayerPrivate(QLayer *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QLayer)
QString m_name;
};
diff --git a/src/render/frontend/qmaterial.cpp b/src/render/frontend/qmaterial.cpp
index bedae8753..c20862754 100644
--- a/src/render/frontend/qmaterial.cpp
+++ b/src/render/frontend/qmaterial.cpp
@@ -74,15 +74,15 @@ QMaterialPrivate::QMaterialPrivate(QMaterial *qq)
{
}
-void QMaterialPrivate::copy(const QNodePrivate *ref)
+void QMaterial::copy(const QNode *ref)
{
- QComponentPrivate::copy(ref);
- const QMaterialPrivate *material = static_cast<const QMaterialPrivate*>(ref);
- Q_FOREACH (QParameter *p, material->m_parameters)
- q_func()->addParameter(qobject_cast<QParameter *>(QNodePrivate::get(p)->clone()));
+ QComponent::copy(ref);
+ const QMaterial *material = static_cast<const QMaterial*>(ref);
+ Q_FOREACH (QParameter *p, material->d_func()->m_parameters)
+ addParameter(qobject_cast<QParameter *>(QNodePrivate::get(p)->clone()));
- if (material->m_effect != Q_NULLPTR)
- q_func()->setEffect(qobject_cast<QEffect *>(QNodePrivate::get(material->m_effect)->clone()));
+ if (material->d_func()->m_effect)
+ setEffect(qobject_cast<QEffect *>(QNodePrivate::get(material->d_func()->m_effect)->clone()));
}
QMaterial::QMaterial(QNode *parent)
diff --git a/src/render/frontend/qmaterial.h b/src/render/frontend/qmaterial.h
index e23264b9d..7dccf350d 100644
--- a/src/render/frontend/qmaterial.h
+++ b/src/render/frontend/qmaterial.h
@@ -81,6 +81,7 @@ Q_SIGNALS:
protected:
QMaterial(QMaterialPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QMaterial)
diff --git a/src/render/frontend/qmaterial_p.h b/src/render/frontend/qmaterial_p.h
index c643ee4ed..0c9b7fce9 100644
--- a/src/render/frontend/qmaterial_p.h
+++ b/src/render/frontend/qmaterial_p.h
@@ -57,8 +57,6 @@ class QT3DRENDERERSHARED_EXPORT QMaterialPrivate : public QComponentPrivate
public:
QMaterialPrivate(QMaterial *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QMaterial)
QList<QParameter *> m_parameters;
TextureDict m_textures;
diff --git a/src/render/frontend/qmesh.cpp b/src/render/frontend/qmesh.cpp
index e8c8279c4..05a7419e4 100644
--- a/src/render/frontend/qmesh.cpp
+++ b/src/render/frontend/qmesh.cpp
@@ -71,11 +71,11 @@ QMeshPrivate::QMeshPrivate(QMesh *qq)
: QAbstractMeshPrivate(qq)
{}
-void QMeshPrivate::copy(const QNodePrivate *ref)
+void QMesh::copy(const QNode *ref)
{
- QAbstractMeshPrivate::copy(ref);
- const QMeshPrivate *mesh = static_cast<const QMeshPrivate *>(ref);
- m_source = mesh->m_source;
+ QAbstractMesh::copy(ref);
+ const QMesh *mesh = static_cast<const QMesh*>(ref);
+ d_func()->m_source = mesh->d_func()->m_source;
}
QMesh::QMesh(QNode *parent)
diff --git a/src/render/frontend/qmesh.h b/src/render/frontend/qmesh.h
index 7a65db92c..d69bb360d 100644
--- a/src/render/frontend/qmesh.h
+++ b/src/render/frontend/qmesh.h
@@ -76,6 +76,7 @@ Q_SIGNALS:
protected:
QMesh(QMeshPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QMesh)
diff --git a/src/render/frontend/qmesh_p.h b/src/render/frontend/qmesh_p.h
index 77102b0ad..de9efad34 100644
--- a/src/render/frontend/qmesh_p.h
+++ b/src/render/frontend/qmesh_p.h
@@ -57,8 +57,6 @@ class QT3DRENDERERSHARED_EXPORT QMeshPrivate : public QAbstractMeshPrivate
public:
QMeshPrivate(QMesh *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QMesh)
QString m_source;
diff --git a/src/render/frontend/qparameter.cpp b/src/render/frontend/qparameter.cpp
index 247b9ebe2..bc1ee940c 100644
--- a/src/render/frontend/qparameter.cpp
+++ b/src/render/frontend/qparameter.cpp
@@ -61,13 +61,13 @@ void QParameterPrivate::setValue(const QVariant &v)
m_value = v;
}
-void QParameterPrivate::copy(const QNodePrivate *ref)
+void QParameter::copy(const QNode *ref)
{
- QNodePrivate::copy(ref);
- const QParameterPrivate *param = static_cast<const QParameterPrivate *>(ref);
- m_name = param->m_name;
- m_value = param->m_value;
- m_isTexture = param->m_isTexture;
+ QNode::copy(ref);
+ const QParameter *param = static_cast<const QParameter*>(ref);
+ d_func()->m_name = param->d_func()->m_name;
+ d_func()->m_value = param->d_func()->m_value;
+ d_func()->m_isTexture = param->d_func()->m_isTexture;
}
QParameter::QParameter(QParameterPrivate &dd, QNode *parent)
diff --git a/src/render/frontend/qparameter.h b/src/render/frontend/qparameter.h
index 7c42a7c76..c5c7d0fc3 100644
--- a/src/render/frontend/qparameter.h
+++ b/src/render/frontend/qparameter.h
@@ -82,6 +82,7 @@ Q_SIGNALS:
protected:
QParameter(QParameterPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QParameter)
diff --git a/src/render/frontend/qparameter_p.h b/src/render/frontend/qparameter_p.h
index e9f917939..c32f9018a 100644
--- a/src/render/frontend/qparameter_p.h
+++ b/src/render/frontend/qparameter_p.h
@@ -59,7 +59,6 @@ public:
Q_DECLARE_PUBLIC(QParameter)
virtual void setValue(const QVariant &v);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
QString m_name;
QVariant m_value;
diff --git a/src/render/frontend/qparametermapper.cpp b/src/render/frontend/qparametermapper.cpp
index 28e7c698b..fa5f7ed2a 100644
--- a/src/render/frontend/qparametermapper.cpp
+++ b/src/render/frontend/qparametermapper.cpp
@@ -52,13 +52,13 @@ QParameterMapperPrivate::QParameterMapperPrivate(QParameterMapper *qq)
{
}
-void QParameterMapperPrivate::copy(const QNodePrivate *ref)
+void QParameterMapper::copy(const QNode *ref)
{
- QNodePrivate::copy(ref);
- const QParameterMapperPrivate *mapper = static_cast<const QParameterMapperPrivate *>(ref);
- m_parameterName = mapper->m_parameterName;
- m_shaderVariableName = mapper->m_shaderVariableName;
- m_bindingType = mapper->m_bindingType;
+ QNode::copy(ref);
+ const QParameterMapper *mapper = static_cast<const QParameterMapper*>(ref);
+ d_func()->m_parameterName = mapper->d_func()->m_parameterName;
+ d_func()->m_shaderVariableName = mapper->d_func()->m_shaderVariableName;
+ d_func()->m_bindingType = mapper->d_func()->m_bindingType;
}
QParameterMapper::QParameterMapper(QNode *parent)
diff --git a/src/render/frontend/qparametermapper.h b/src/render/frontend/qparametermapper.h
index 51b99757b..99001025d 100644
--- a/src/render/frontend/qparametermapper.h
+++ b/src/render/frontend/qparametermapper.h
@@ -85,6 +85,7 @@ Q_SIGNALS:
protected:
QParameterMapper(QParameterMapperPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QParameterMapper)
diff --git a/src/render/frontend/qparametermapper_p.h b/src/render/frontend/qparametermapper_p.h
index b75155ba2..2d7d5a43c 100644
--- a/src/render/frontend/qparametermapper_p.h
+++ b/src/render/frontend/qparametermapper_p.h
@@ -54,8 +54,6 @@ class QParameterMapperPrivate : public QNodePrivate
public:
QParameterMapperPrivate(QParameterMapper *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QParameterMapper)
QString m_parameterName;
diff --git a/src/render/frontend/qplanemesh.cpp b/src/render/frontend/qplanemesh.cpp
index 560cf5b24..2e25dc592 100644
--- a/src/render/frontend/qplanemesh.cpp
+++ b/src/render/frontend/qplanemesh.cpp
@@ -65,13 +65,13 @@ QPlaneMesh::QPlaneMesh(QNode *parent)
setDirty(true);
}
-void QPlaneMeshPrivate::copy(const QNodePrivate *ref)
+void QPlaneMesh::copy(const QNode *ref)
{
- QAbstractShapeMeshPrivate::copy(ref);
- const QPlaneMeshPrivate *mesh = static_cast<const QPlaneMeshPrivate *>(ref);
- m_width = mesh->m_width;
- m_height = mesh->m_height;
- m_meshResolution = mesh->m_meshResolution;
+ QAbstractShapeMesh::copy(ref);
+ const QPlaneMesh *mesh = static_cast<const QPlaneMesh*>(ref);
+ d_func()->m_width = mesh->d_func()->m_width;
+ d_func()->m_height = mesh->d_func()->m_height;
+ d_func()->m_meshResolution = mesh->d_func()->m_meshResolution;
}
QPlaneMesh::QPlaneMesh(QPlaneMeshPrivate &dd, QNode *parent)
diff --git a/src/render/frontend/qplanemesh.h b/src/render/frontend/qplanemesh.h
index a2199a1d3..8ba02d57c 100644
--- a/src/render/frontend/qplanemesh.h
+++ b/src/render/frontend/qplanemesh.h
@@ -80,6 +80,7 @@ Q_SIGNALS:
protected:
QPlaneMesh(QPlaneMeshPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QPlaneMesh)
diff --git a/src/render/frontend/qplanemesh_p.h b/src/render/frontend/qplanemesh_p.h
index 9c72da9a7..90bceef55 100644
--- a/src/render/frontend/qplanemesh_p.h
+++ b/src/render/frontend/qplanemesh_p.h
@@ -57,8 +57,6 @@ class QPlaneMeshPrivate : public QAbstractShapeMeshPrivate
public:
QPlaneMeshPrivate(QPlaneMesh *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QPlaneMesh)
float m_width;
diff --git a/src/render/frontend/qrenderattachment.cpp b/src/render/frontend/qrenderattachment.cpp
index d3cd769ea..cb55fa380 100644
--- a/src/render/frontend/qrenderattachment.cpp
+++ b/src/render/frontend/qrenderattachment.cpp
@@ -57,12 +57,12 @@ QRenderAttachmentPrivate::QRenderAttachmentPrivate(QRenderAttachment *qq)
{
}
-void QRenderAttachmentPrivate::copy(const QNodePrivate *ref)
+void QRenderAttachment::copy(const QNode *ref)
{
- QNodePrivate::copy(ref);
- const QRenderAttachmentPrivate *rA = static_cast<const QRenderAttachmentPrivate *>(ref);
- m_type = rA->m_type;
- q_func()->setTexture(qobject_cast<QTexture *>(QNodePrivate::get(rA->m_texture)->clone()));
+ QNode::copy(ref);
+ const QRenderAttachment *rA = static_cast<const QRenderAttachment*>(ref);
+ d_func()->m_type = rA->d_func()->m_type;
+ setTexture(qobject_cast<QTexture *>(QNodePrivate::get(rA->d_func()->m_texture)->clone()));
}
QRenderAttachment::QRenderAttachment(QNode *parent)
diff --git a/src/render/frontend/qrenderattachment.h b/src/render/frontend/qrenderattachment.h
index 7b93b2980..52688e3c9 100644
--- a/src/render/frontend/qrenderattachment.h
+++ b/src/render/frontend/qrenderattachment.h
@@ -126,6 +126,7 @@ Q_SIGNALS:
protected:
QRenderAttachment(QRenderAttachmentPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QRenderAttachment)
diff --git a/src/render/frontend/qrenderattachment_p.h b/src/render/frontend/qrenderattachment_p.h
index 9b58c067c..4e386ba8d 100644
--- a/src/render/frontend/qrenderattachment_p.h
+++ b/src/render/frontend/qrenderattachment_p.h
@@ -56,8 +56,6 @@ class QRenderAttachmentPrivate : public QNodePrivate
public:
QRenderAttachmentPrivate(QRenderAttachment *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QRenderAttachment)
QTexture *m_texture;
diff --git a/src/render/frontend/qrenderpass.cpp b/src/render/frontend/qrenderpass.cpp
index 7057103f5..ea267418b 100644
--- a/src/render/frontend/qrenderpass.cpp
+++ b/src/render/frontend/qrenderpass.cpp
@@ -61,18 +61,18 @@ QRenderPassPrivate::QRenderPassPrivate(QRenderPass *qq)
{
}
-void QRenderPassPrivate::copy(const QNodePrivate *ref)
+void QRenderPass::copy(const QNode *ref)
{
- QNodePrivate::copy(ref);
- const QRenderPassPrivate *other = static_cast<const QRenderPassPrivate*>(ref);
- m_shader = qobject_cast<QShaderProgram *>(QNodePrivate::get(other->m_shader)->clone());
-
- Q_FOREACH (QCriterion *crit, other->m_criteriaList)
- q_func()->addCriterion(qobject_cast<QCriterion *>(QNodePrivate::get(crit)->clone()));
- Q_FOREACH (QParameterMapper *binding, other->m_bindings)
- q_func()->addBinding(qobject_cast<QParameterMapper *>(QNodePrivate::get(binding)->clone()));
- Q_FOREACH (QRenderState *renderState, other->m_renderStates)
- q_func()->addRenderState(qobject_cast<QRenderState *>(QNodePrivate::get(renderState)->clone()));
+ QNode::copy(ref);
+ const QRenderPass *other = static_cast<const QRenderPass*>(ref);
+ d_func()->m_shader = qobject_cast<QShaderProgram *>(QNodePrivate::get(other->d_func()->m_shader)->clone());
+
+ Q_FOREACH (QCriterion *crit, other->d_func()->m_criteriaList)
+ addCriterion(qobject_cast<QCriterion *>(QNodePrivate::get(crit)->clone()));
+ Q_FOREACH (QParameterMapper *binding, other->d_func()->m_bindings)
+ addBinding(qobject_cast<QParameterMapper *>(QNodePrivate::get(binding)->clone()));
+ Q_FOREACH (QRenderState *renderState, other->d_func()->m_renderStates)
+ addRenderState(qobject_cast<QRenderState *>(QNodePrivate::get(renderState)->clone()));
}
QRenderPass::QRenderPass(QNode *parent)
diff --git a/src/render/frontend/qrenderpass.h b/src/render/frontend/qrenderpass.h
index f8116d831..df0dd0bc8 100644
--- a/src/render/frontend/qrenderpass.h
+++ b/src/render/frontend/qrenderpass.h
@@ -101,6 +101,7 @@ Q_SIGNALS:
protected:
QRenderPass(QRenderPassPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QRenderPass)
diff --git a/src/render/frontend/qrenderpass_p.h b/src/render/frontend/qrenderpass_p.h
index e4951726e..ec0e420d0 100644
--- a/src/render/frontend/qrenderpass_p.h
+++ b/src/render/frontend/qrenderpass_p.h
@@ -66,7 +66,6 @@ class QT3DRENDERERSHARED_EXPORT QRenderPassPrivate : public QNodePrivate
{
public:
QRenderPassPrivate(QRenderPass *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
Q_DECLARE_PUBLIC(QRenderPass)
ParameterList m_attributes;
diff --git a/src/render/frontend/qrendertarget.cpp b/src/render/frontend/qrendertarget.cpp
index ecf51bb36..1a0ee0678 100644
--- a/src/render/frontend/qrendertarget.cpp
+++ b/src/render/frontend/qrendertarget.cpp
@@ -53,12 +53,12 @@ QRenderTargetPrivate::QRenderTargetPrivate(QRenderTarget *qq)
{
}
-void QRenderTargetPrivate::copy(const QNodePrivate *ref)
+void QRenderTarget::copy(const QNode *ref)
{
- QNodePrivate::copy(ref);
- const QRenderTargetPrivate *other = static_cast<const QRenderTargetPrivate*>(ref);
- Q_FOREACH (QRenderAttachment *attachment, other->m_attachments)
- q_func()->addAttachment(qobject_cast<QRenderAttachment *>(QNodePrivate::get(attachment)->clone()));
+ QNode::copy(ref);
+ const QRenderTarget *other = static_cast<const QRenderTarget*>(ref);
+ Q_FOREACH (QRenderAttachment *attachment, other->d_func()->m_attachments)
+ addAttachment(qobject_cast<QRenderAttachment *>(QNodePrivate::get(attachment)->clone()));
}
QRenderTarget::QRenderTarget(QNode *parent)
diff --git a/src/render/frontend/qrendertarget.h b/src/render/frontend/qrendertarget.h
index 758e54790..61de10b36 100644
--- a/src/render/frontend/qrendertarget.h
+++ b/src/render/frontend/qrendertarget.h
@@ -64,6 +64,7 @@ public:
protected:
QRenderTarget(QRenderTargetPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QRenderTarget)
diff --git a/src/render/frontend/qrendertarget_p.h b/src/render/frontend/qrendertarget_p.h
index 433c38467..214aedec1 100644
--- a/src/render/frontend/qrendertarget_p.h
+++ b/src/render/frontend/qrendertarget_p.h
@@ -56,8 +56,6 @@ class QRenderTargetPrivate : public QComponentPrivate
public:
QRenderTargetPrivate(QRenderTarget *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QRenderTarget)
QList<QRenderAttachment *> m_attachments;
};
diff --git a/src/render/frontend/qsceneloader.cpp b/src/render/frontend/qsceneloader.cpp
index c9fe5c1f7..b81c507c9 100644
--- a/src/render/frontend/qsceneloader.cpp
+++ b/src/render/frontend/qsceneloader.cpp
@@ -59,7 +59,7 @@ QSceneLoader::QSceneLoader(QNode *parent)
// Called in main thread
void QSceneLoader::sceneChangeEvent(const QSceneChangePtr &change)
{
- Q_D(Render::QAbstractSceneLoader);
+ Render::QAbstractSceneLoaderPrivate *d = static_cast<Render::QAbstractSceneLoaderPrivate*>(QNodePrivate::get(this));
QScenePropertyChangePtr e = qSharedPointerCast<QScenePropertyChange>(change);
if (e->type() == NodeUpdated) {
if (e->propertyName() == QByteArrayLiteral("scene")) {
diff --git a/src/render/frontend/qscissortest.cpp b/src/render/frontend/qscissortest.cpp
index 1631ba5ab..31dcda564 100644
--- a/src/render/frontend/qscissortest.cpp
+++ b/src/render/frontend/qscissortest.cpp
@@ -62,8 +62,6 @@ public:
{
}
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QScissorTest)
int m_left;
int m_bottom;
@@ -76,14 +74,14 @@ QScissorTest::QScissorTest(QNode *parent)
{
}
-void QScissorTestPrivate::copy(const QNodePrivate *ref)
+void QScissorTest::copy(const QNode *ref)
{
- QRenderStatePrivate::copy(ref);
- const QScissorTestPrivate *refState = static_cast<const QScissorTestPrivate *>(ref);
- m_left = refState->m_left;
- m_bottom = refState->m_bottom;
- m_width = refState->m_width;
- m_height = refState->m_height;
+ QRenderState::copy(ref);
+ const QScissorTest *refState = static_cast<const QScissorTest*>(ref);
+ d_func()->m_left = refState->d_func()->m_left;
+ d_func()->m_bottom = refState->d_func()->m_bottom;
+ d_func()->m_width = refState->d_func()->m_width;
+ d_func()->m_height = refState->d_func()->m_height;
}
int QScissorTest::left() const
diff --git a/src/render/frontend/qscissortest.h b/src/render/frontend/qscissortest.h
index 4caa7106b..af1feb7ad 100644
--- a/src/render/frontend/qscissortest.h
+++ b/src/render/frontend/qscissortest.h
@@ -80,6 +80,9 @@ Q_SIGNALS:
void widthChanged();
void heightChanged();
+protected:
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
private:
Q_DECLARE_PRIVATE(QScissorTest)
QT3D_CLONEABLE(QScissorTest)
diff --git a/src/render/frontend/qshaderprogram.cpp b/src/render/frontend/qshaderprogram.cpp
index c3e83ccb8..8139e38a8 100644
--- a/src/render/frontend/qshaderprogram.cpp
+++ b/src/render/frontend/qshaderprogram.cpp
@@ -54,23 +54,23 @@ QShaderProgramPrivate::QShaderProgramPrivate(QShaderProgram *qq)
{
}
-void QShaderProgramPrivate::copy(const QNodePrivate *ref)
-{
- QNodePrivate::copy(ref);
- const QShaderProgramPrivate *prog = static_cast<const QShaderProgramPrivate *>(ref);
- m_vertexSourceFile = prog->m_vertexSourceFile;
- m_tessControlSourceFile = prog->m_tessControlSourceFile;
- m_tessEvalSourceFile = prog->m_tessEvalSourceFile;
- m_geometrySourceFile = prog->m_geometrySourceFile;
- m_fragmentSourceFile = prog->m_fragmentSourceFile;
- m_computeSourceFile = prog->m_computeSourceFile;
-
- m_vertexShaderCode = prog->m_vertexShaderCode;
- m_tessControlShaderCode = prog->m_tessControlShaderCode;
- m_tessEvalShaderCode = prog->m_tessEvalShaderCode;
- m_geometryShaderCode = prog->m_geometryShaderCode;
- m_fragmentShaderCode = prog->m_fragmentShaderCode;
- m_computeShaderCode = prog->m_computeShaderCode;
+void QShaderProgram::copy(const QNode *ref)
+{
+ QNode::copy(ref);
+ const QShaderProgram *prog = static_cast<const QShaderProgram*>(ref);
+ d_func()->m_vertexSourceFile = prog->d_func()->m_vertexSourceFile;
+ d_func()->m_tessControlSourceFile = prog->d_func()->m_tessControlSourceFile;
+ d_func()->m_tessEvalSourceFile = prog->d_func()->m_tessEvalSourceFile;
+ d_func()->m_geometrySourceFile = prog->d_func()->m_geometrySourceFile;
+ d_func()->m_fragmentSourceFile = prog->d_func()->m_fragmentSourceFile;
+ d_func()->m_computeSourceFile = prog->d_func()->m_computeSourceFile;
+
+ d_func()->m_vertexShaderCode = prog->d_func()->m_vertexShaderCode;
+ d_func()->m_tessControlShaderCode = prog->d_func()->m_tessControlShaderCode;
+ d_func()->m_tessEvalShaderCode = prog->d_func()->m_tessEvalShaderCode;
+ d_func()->m_geometryShaderCode = prog->d_func()->m_geometryShaderCode;
+ d_func()->m_fragmentShaderCode = prog->d_func()->m_fragmentShaderCode;
+ d_func()->m_computeShaderCode = prog->d_func()->m_computeShaderCode;
}
QShaderProgram::QShaderProgram(QNode *parent)
diff --git a/src/render/frontend/qshaderprogram.h b/src/render/frontend/qshaderprogram.h
index 5106e136a..63f0398a0 100644
--- a/src/render/frontend/qshaderprogram.h
+++ b/src/render/frontend/qshaderprogram.h
@@ -143,6 +143,7 @@ Q_SIGNALS:
protected:
QShaderProgram(QShaderProgramPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QShaderProgram)
diff --git a/src/render/frontend/qshaderprogram_p.h b/src/render/frontend/qshaderprogram_p.h
index 083dc1530..001168c0a 100644
--- a/src/render/frontend/qshaderprogram_p.h
+++ b/src/render/frontend/qshaderprogram_p.h
@@ -55,8 +55,6 @@ class QShaderProgramPrivate : public QNodePrivate
public:
QShaderProgramPrivate(QShaderProgram *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QShaderProgram)
QString m_vertexSourceFile;
QString m_tessControlSourceFile;
diff --git a/src/render/frontend/qspheremesh.cpp b/src/render/frontend/qspheremesh.cpp
index bdc356160..99d24dd13 100644
--- a/src/render/frontend/qspheremesh.cpp
+++ b/src/render/frontend/qspheremesh.cpp
@@ -80,8 +80,6 @@ class QSphereMeshPrivate : public QAbstractShapeMeshPrivate
, m_radius(1.0)
{}
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC (QSphereMesh)
bool m_generateTangents;
int m_rings;
@@ -95,14 +93,14 @@ QSphereMesh::QSphereMesh(QNode *parent)
setDirty(true);
}
-void QSphereMeshPrivate::copy(const QNodePrivate *ref)
+void QSphereMesh::copy(const QNode *ref)
{
- QAbstractShapeMeshPrivate::copy(ref);
- const QSphereMeshPrivate *mesh = static_cast<const QSphereMeshPrivate *>(ref);
- m_generateTangents = mesh->m_generateTangents;
- m_rings = mesh->m_rings;
- m_slices = mesh->m_slices;
- m_radius = mesh->m_radius;
+ QAbstractShapeMesh::copy(ref);
+ const QSphereMesh *mesh = static_cast<const QSphereMesh*>(ref);
+ d_func()->m_generateTangents = mesh->d_func()->m_generateTangents;
+ d_func()->m_rings = mesh->d_func()->m_rings;
+ d_func()->m_slices = mesh->d_func()->m_slices;
+ d_func()->m_radius = mesh->d_func()->m_radius;
}
void QSphereMesh::setRings(int rings)
diff --git a/src/render/frontend/qspheremesh.h b/src/render/frontend/qspheremesh.h
index 28eb224f1..a0ee2d568 100644
--- a/src/render/frontend/qspheremesh.h
+++ b/src/render/frontend/qspheremesh.h
@@ -82,6 +82,9 @@ Q_SIGNALS:
void slicesChanged();
void generateTangentsChanged();
+protected:
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
private:
Q_DECLARE_PRIVATE(QSphereMesh)
QT3D_CLONEABLE(QSphereMesh)
diff --git a/src/render/frontend/qspotlight.cpp b/src/render/frontend/qspotlight.cpp
index 0a9a571ac..7dfcc842a 100644
--- a/src/render/frontend/qspotlight.cpp
+++ b/src/render/frontend/qspotlight.cpp
@@ -74,12 +74,12 @@ QSpotLightPrivate::QSpotLightPrivate(QSpotLight *qq)
{
}
-void QSpotLightPrivate::copy(const QNodePrivate *ref)
+void QSpotLight::copy(const QNode *ref)
{
- QAbstractLightPrivate::copy(ref);
- const QSpotLightPrivate *light = static_cast<const QSpotLightPrivate *>(ref);
- m_direction = light->m_direction;
- m_cutOffAngle = light->m_cutOffAngle;
+ QAbstractLight::copy(ref);
+ const QSpotLight *light = static_cast<const QSpotLight*>(ref);
+ d_func()->m_direction = light->d_func()->m_direction;
+ d_func()->m_cutOffAngle = light->d_func()->m_cutOffAngle;
}
QSpotLight::QSpotLight(QNode *parent)
diff --git a/src/render/frontend/qspotlight.h b/src/render/frontend/qspotlight.h
index 5bd0acdd4..28a7c5ded 100644
--- a/src/render/frontend/qspotlight.h
+++ b/src/render/frontend/qspotlight.h
@@ -75,6 +75,7 @@ Q_SIGNALS:
protected:
QSpotLight(QSpotLightPrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QSpotLight)
diff --git a/src/render/frontend/qspotlight_p.h b/src/render/frontend/qspotlight_p.h
index f6a1cc366..24a11300c 100644
--- a/src/render/frontend/qspotlight_p.h
+++ b/src/render/frontend/qspotlight_p.h
@@ -53,8 +53,6 @@ class QT3DRENDERERSHARED_EXPORT QSpotLightPrivate : public QAbstractLightPrivate
public:
QSpotLightPrivate(QSpotLight *qq);
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QSpotLight)
float m_cutOffAngle;
QVector3D m_direction;
diff --git a/src/render/frontend/qstenciltest.cpp b/src/render/frontend/qstenciltest.cpp
index 312e4ce8c..e2ac97f67 100644
--- a/src/render/frontend/qstenciltest.cpp
+++ b/src/render/frontend/qstenciltest.cpp
@@ -61,8 +61,6 @@ public:
{
}
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QStencilTest)
uint m_mask;
QStencilTest::StencilFunc m_func;
@@ -74,13 +72,13 @@ QStencilTest::QStencilTest(QNode *parent)
{
}
-void QStencilTestPrivate::copy(const QNodePrivate *ref)
+void QStencilTest::copy(const QNode *ref)
{
- QRenderStatePrivate::copy(ref);
- const QStencilTestPrivate *refState = static_cast<const QStencilTestPrivate *>(ref);
- m_mask = refState->m_mask;
- m_faceMode = refState->m_faceMode;
- m_func = refState->m_func;
+ QRenderState::copy(ref);
+ const QStencilTest *refState = static_cast<const QStencilTest*>(ref);
+ d_func()->m_mask = refState->d_func()->m_mask;
+ d_func()->m_faceMode = refState->d_func()->m_faceMode;
+ d_func()->m_func = refState->d_func()->m_func;
}
uint QStencilTest::mask() const
diff --git a/src/render/frontend/qstenciltest.h b/src/render/frontend/qstenciltest.h
index a7ef9f4c0..d414ed350 100644
--- a/src/render/frontend/qstenciltest.h
+++ b/src/render/frontend/qstenciltest.h
@@ -96,6 +96,9 @@ Q_SIGNALS:
void faceModeChanged();
void funcChanged();
+protected:
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
private:
Q_DECLARE_PRIVATE(QStencilTest)
QT3D_CLONEABLE(QStencilTest)
diff --git a/src/render/frontend/qtechnique.cpp b/src/render/frontend/qtechnique.cpp
index 1ea712902..0485d113c 100644
--- a/src/render/frontend/qtechnique.cpp
+++ b/src/render/frontend/qtechnique.cpp
@@ -68,18 +68,18 @@ QTechnique::QTechnique(QNode *parent)
QObject::connect(d->m_openGLFilter, SIGNAL(openGLFilterChanged()), this, SLOT(openGLFilterChanged()));
}
-void QTechniquePrivate::copy(const QNodePrivate *ref)
+void QTechnique::copy(const QNode *ref)
{
- QNodePrivate::copy(ref);
- const QTechniquePrivate *tech = static_cast<const QTechniquePrivate *>(ref);
- m_openGLFilter->copy(tech->m_openGLFilter);
+ QNode::copy(ref);
+ const QTechnique *tech = static_cast<const QTechnique*>(ref);
+ d_func()->m_openGLFilter->copy(tech->d_func()->m_openGLFilter);
- Q_FOREACH (QCriterion *criterion, tech->m_criteriaList)
- q_func()->addCriterion(qobject_cast<QCriterion *>(QNodePrivate::get(criterion)->clone()));
- Q_FOREACH (QRenderPass *pass, tech->m_renderPasses)
- q_func()->addPass(qobject_cast<QRenderPass *>(QNodePrivate::get(pass)->clone()));
- Q_FOREACH (QParameter *p, tech->m_parameters)
- q_func()->addParameter(qobject_cast<QParameter *>(QNodePrivate::get(p)->clone()));
+ Q_FOREACH (QCriterion *criterion, tech->d_func()->m_criteriaList)
+ addCriterion(qobject_cast<QCriterion *>(QNodePrivate::get(criterion)->clone()));
+ Q_FOREACH (QRenderPass *pass, tech->d_func()->m_renderPasses)
+ addPass(qobject_cast<QRenderPass *>(QNodePrivate::get(pass)->clone()));
+ Q_FOREACH (QParameter *p, tech->d_func()->m_parameters)
+ addParameter(qobject_cast<QParameter *>(QNodePrivate::get(p)->clone()));
}
QTechnique::QTechnique(QTechniquePrivate &dd, QNode *parent)
diff --git a/src/render/frontend/qtechnique.h b/src/render/frontend/qtechnique.h
index 67e3dbad7..024bb6532 100644
--- a/src/render/frontend/qtechnique.h
+++ b/src/render/frontend/qtechnique.h
@@ -84,6 +84,7 @@ public:
protected:
QTechnique(QTechniquePrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
protected Q_SLOTS:
void openGLFilterChanged();
diff --git a/src/render/frontend/qtechnique_p.h b/src/render/frontend/qtechnique_p.h
index a5e5a5106..325ffe7f6 100644
--- a/src/render/frontend/qtechnique_p.h
+++ b/src/render/frontend/qtechnique_p.h
@@ -61,8 +61,6 @@ public:
QTechniquePrivate(QTechnique *dd);
~QTechniquePrivate();
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QTechnique)
QList<QCriterion *> m_criteriaList;
QList<QParameter *> m_parameters;
diff --git a/src/render/frontend/qtexture.cpp b/src/render/frontend/qtexture.cpp
index c55b8bd67..39a660acd 100644
--- a/src/render/frontend/qtexture.cpp
+++ b/src/render/frontend/qtexture.cpp
@@ -70,8 +70,6 @@ public :
, m_maximumAnisotropy(1.0f)
{}
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QTexture)
QTexture::Target m_target;
@@ -88,19 +86,19 @@ public :
float m_maximumAnisotropy;
};
-void QTexturePrivate::copy(const QNodePrivate *ref)
+void QTexture::copy(const QNode *ref)
{
- QNodePrivate::copy(ref);
- const QTexturePrivate *t = static_cast<const QTexturePrivate *>(ref);
- m_target = t->m_target;
- m_width = t->m_width;
- m_height = t->m_height;
- m_depth = t->m_depth;
- m_format = t->m_format;
- m_wrapMode = t->m_wrapMode;
- m_minFilter = t->m_minFilter;
- m_magFilter = t->m_magFilter;
- m_autoMipMap = t->m_autoMipMap;
+ QNode::copy(ref);
+ const QTexture *t = static_cast<const QTexture*>(ref);
+ d_func()->m_target = t->d_func()->m_target;
+ d_func()->m_width = t->d_func()->m_width;
+ d_func()->m_height = t->d_func()->m_height;
+ d_func()->m_depth = t->d_func()->m_depth;
+ d_func()->m_format = t->d_func()->m_format;
+ d_func()->m_wrapMode = t->d_func()->m_wrapMode;
+ d_func()->m_minFilter = t->d_func()->m_minFilter;
+ d_func()->m_magFilter = t->d_func()->m_magFilter;
+ d_func()->m_autoMipMap = t->d_func()->m_autoMipMap;
// TO DO: Copy TexImageDataPtr
}
diff --git a/src/render/frontend/qtexture.h b/src/render/frontend/qtexture.h
index 50784f2ff..e04c4136e 100644
--- a/src/render/frontend/qtexture.h
+++ b/src/render/frontend/qtexture.h
@@ -291,6 +291,7 @@ Q_SIGNALS:
protected:
QTexture(QTexturePrivate &dd, QNode *parent = 0);
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
void setStatus(Status status);
private:
diff --git a/src/render/frontend/qtorusmesh.cpp b/src/render/frontend/qtorusmesh.cpp
index fd76ecc7f..0f684d04c 100644
--- a/src/render/frontend/qtorusmesh.cpp
+++ b/src/render/frontend/qtorusmesh.cpp
@@ -79,8 +79,6 @@ class QTorusMeshPrivate : public QAbstractShapeMeshPrivate
, m_minorRadius(1.0)
{}
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(QTorusMesh)
int m_rings;
int m_slices;
@@ -88,14 +86,14 @@ class QTorusMeshPrivate : public QAbstractShapeMeshPrivate
float m_minorRadius;
};
-void QTorusMeshPrivate::copy(const QNodePrivate *ref)
+void QTorusMesh::copy(const QNode *ref)
{
- QAbstractShapeMeshPrivate::copy(ref);
- const QTorusMeshPrivate *mesh = static_cast<const QTorusMeshPrivate *>(ref);
- m_rings = mesh->m_rings;
- m_slices = mesh->m_slices;
- m_radius = mesh->m_radius;
- m_minorRadius = mesh->m_minorRadius;
+ QAbstractShapeMesh::copy(ref);
+ const QTorusMesh *mesh = static_cast<const QTorusMesh*>(ref);
+ d_func()->m_rings = mesh->d_func()->m_rings;
+ d_func()->m_slices = mesh->d_func()->m_slices;
+ d_func()->m_radius = mesh->d_func()->m_radius;
+ d_func()->m_minorRadius = mesh->d_func()->m_minorRadius;
}
diff --git a/src/render/frontend/qtorusmesh.h b/src/render/frontend/qtorusmesh.h
index 27093c2dc..b276c8869 100644
--- a/src/render/frontend/qtorusmesh.h
+++ b/src/render/frontend/qtorusmesh.h
@@ -81,6 +81,9 @@ Q_SIGNALS:
void ringsChanged();
void slicesChanged();
+protected:
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
private:
Q_DECLARE_PRIVATE(QTorusMesh)
QT3D_CLONEABLE(QTorusMesh)
diff --git a/src/render/io/gltfparser.cpp b/src/render/io/gltfparser.cpp
index 0888041bd..d5feb9464 100644
--- a/src/render/io/gltfparser.cpp
+++ b/src/render/io/gltfparser.cpp
@@ -227,6 +227,9 @@ public:
void setData(QMeshDataPtr data);
QAbstractMeshFunctorPtr meshFunctor() const Q_DECL_OVERRIDE;
+protected:
+ void copy(const QNode *ref) Q_DECL_OVERRIDE;
+
private:
QT3D_CLONEABLE(GLTFParserMesh)
Q_DECLARE_PRIVATE(GLTFParserMesh)
@@ -241,8 +244,6 @@ public:
{
}
- void copy(const QNodePrivate *ref) Q_DECL_OVERRIDE;
-
Q_DECLARE_PUBLIC(GLTFParserMesh)
QMeshDataPtr m_meshData;
};
@@ -1007,11 +1008,11 @@ QVariant GLTFParser::parameterValueFromJSON(QParameter* p, QJsonValue val)
return QVariant();
}
-void GLTFParserMeshPrivate::copy(const QNodePrivate *ref)
+void GLTFParserMesh::copy(const QNode *ref)
{
- QAbstractMeshPrivate::copy(ref);
- const GLTFParserMeshPrivate *gltfMesh = static_cast<const GLTFParserMeshPrivate *>(ref);
- m_meshData = gltfMesh->m_meshData;
+ QAbstractMesh::copy(ref);
+ const GLTFParserMesh *gltfMesh = static_cast<const GLTFParserMesh*>(ref);
+ d_func()->m_meshData = gltfMesh->d_func()->m_meshData;
}
GLTFParserMesh::GLTFParserMesh(QNode *parent)