summaryrefslogtreecommitdiffstats
path: root/src/render/io/gltfparser.cpp
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@kdab.com>2014-10-15 13:38:32 +0200
committerSean Harmer <sean.harmer@kdab.com>2014-10-16 10:18:14 +0200
commitcd1d21fdad54315c4a8ade860ce6b31aa5a6f4b9 (patch)
treec1c042dfdb6c7fd8644c2e45a1cdad18b0703e57 /src/render/io/gltfparser.cpp
parent0f1d0ff5b3adb16afcda091e4ff4657f53581f79 (diff)
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 <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/io/gltfparser.cpp')
-rw-r--r--src/render/io/gltfparser.cpp13
1 files changed, 7 insertions, 6 deletions
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)