summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@kdab.com>2014-10-15 11:20:02 +0200
committerSean Harmer <sean.harmer@kdab.com>2014-10-15 19:37:49 +0200
commit0f1d0ff5b3adb16afcda091e4ff4657f53581f79 (patch)
treebc82ff1bd2f31fe5fa54590ab3f1500d716b07eb /examples
parenta4b9ce44ae244104a941981405742ee42d53ebe0 (diff)
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 <james.turner@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/tessellation-modes/tessellatedquadmesh.cpp7
-rw-r--r--examples/tessellation-modes/tessellatedquadmesh.h2
2 files changed, 1 insertions, 8 deletions
diff --git a/examples/tessellation-modes/tessellatedquadmesh.cpp b/examples/tessellation-modes/tessellatedquadmesh.cpp
index 5fc7a1028..e668a7185 100644
--- a/examples/tessellation-modes/tessellatedquadmesh.cpp
+++ b/examples/tessellation-modes/tessellatedquadmesh.cpp
@@ -50,13 +50,6 @@ TessellatedQuadMesh::TessellatedQuadMesh(Qt3D::QNode *parent)
{
}
-TessellatedQuadMesh *TessellatedQuadMesh::doClone() const
-{
- TessellatedQuadMesh *clone = new TessellatedQuadMesh();
- clone->copy(this);
- return clone;
-}
-
class TessellatedQuadMeshFunctor : public Qt3D::QAbstractMeshFunctor
{
public:
diff --git a/examples/tessellation-modes/tessellatedquadmesh.h b/examples/tessellation-modes/tessellatedquadmesh.h
index 36ceceff9..617ff62fc 100644
--- a/examples/tessellation-modes/tessellatedquadmesh.h
+++ b/examples/tessellation-modes/tessellatedquadmesh.h
@@ -53,7 +53,7 @@ public:
Qt3D::QAbstractMeshFunctorPtr meshFunctor() const Q_DECL_OVERRIDE;
private:
- TessellatedQuadMesh *doClone() const Q_DECL_OVERRIDE;
+ QT3D_CLONEABLE(TessellatedQuadMesh)
};
#endif // TESSELLATEDQUAD_H