From cd1d21fdad54315c4a8ade860ce6b31aa5a6f4b9 Mon Sep 17 00:00:00 2001 From: Kevin Ottens Date: Wed, 15 Oct 2014 13:38:32 +0200 Subject: Have copy() only on QNode It was previously both on QNode and QNodePrivate. The one on QNodePrivate didn't give us much as it didn't eliminate the virtual of QNode. Change-Id: Ia1ea9dd831674109c84bd7005abe7fde3b1223fa Reviewed-by: Paul Lemire Reviewed-by: Sean Harmer --- src/render/io/gltfparser.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/render/io/gltfparser.cpp') 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(ref); - m_meshData = gltfMesh->m_meshData; + QAbstractMesh::copy(ref); + const GLTFParserMesh *gltfMesh = static_cast(ref); + d_func()->m_meshData = gltfMesh->d_func()->m_meshData; } GLTFParserMesh::GLTFParserMesh(QNode *parent) -- cgit v1.2.3