diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2014-09-19 08:37:03 +0200 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2014-09-30 12:16:39 +0200 |
commit | 94bb50fba66435a078f30b1da9cf5507522ab136 (patch) | |
tree | 1c48f4e4463dd0f28fcd38efb259017987bbc8d6 /src/render/frontend/qrenderattachment.cpp | |
parent | 616e8083872c953a31acc871749e05c621c18bd1 (diff) |
Improved/Refactored cloning and doClone off all subclasses
Note: As we are using QScene during cloning, it is important that node hierarchy
be created and added in the proper order (parent then child).
Change-Id: I8fd53f7ca696ec9aca19cc70dc116ccba4154911
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/frontend/qrenderattachment.cpp')
-rw-r--r-- | src/render/frontend/qrenderattachment.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/render/frontend/qrenderattachment.cpp b/src/render/frontend/qrenderattachment.cpp index 4cb493239..44828ca2d 100644 --- a/src/render/frontend/qrenderattachment.cpp +++ b/src/render/frontend/qrenderattachment.cpp @@ -210,9 +210,12 @@ QString QRenderAttachment::name() const return d->m_name; } -QNode *QRenderAttachment::doClone(QNode *clonedParent) const +QNode *QRenderAttachment::doClone(bool isClone) const { - return new QRenderAttachment(clonedParent); + QRenderAttachment *clone = new QRenderAttachment(); + clone->copy(this); + clone->d_func()->m_isClone = isClone; + return clone; } } // Qt3D |