From 0f1d0ff5b3adb16afcda091e4ff4657f53581f79 Mon Sep 17 00:00:00 2001 From: Kevin Ottens Date: Wed, 15 Oct 2014 11:20:02 +0200 Subject: Hide doClone implementations behind a macro This way we will avoid inconsistencies. It also means making some of the copy() implementations more clever. Change-Id: Ic79c9ec7c9c32f8951d5d9f5184592880bf8d5fd Reviewed-by: James Turner Reviewed-by: Sean Harmer --- src/render/io/gltfparser.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/render/io/gltfparser.cpp') diff --git a/src/render/io/gltfparser.cpp b/src/render/io/gltfparser.cpp index 345c1ba9e..0888041bd 100644 --- a/src/render/io/gltfparser.cpp +++ b/src/render/io/gltfparser.cpp @@ -228,7 +228,7 @@ public: QAbstractMeshFunctorPtr meshFunctor() const Q_DECL_OVERRIDE; private: - GLTFParserMesh *doClone() const Q_DECL_OVERRIDE; + QT3D_CLONEABLE(GLTFParserMesh) Q_DECLARE_PRIVATE(GLTFParserMesh) }; @@ -1033,13 +1033,6 @@ QAbstractMeshFunctorPtr GLTFParserMesh::meshFunctor() const return QAbstractMeshFunctorPtr(new GLTFParserMeshFunctor(d->m_meshData)); } -GLTFParserMesh *GLTFParserMesh::doClone() const -{ - GLTFParserMesh *clone = new GLTFParserMesh(); - clone->d_func()->copy(d_func()); - return clone; -} - GLTFParserMesh::GLTFParserMeshFunctor::GLTFParserMeshFunctor(QMeshDataPtr meshData) : QAbstractMeshFunctor() , m_meshData(meshData) -- cgit v1.2.3