summaryrefslogtreecommitdiffstats
path: root/src/render/frontend/qrenderattachment.cpp
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 /src/render/frontend/qrenderattachment.cpp
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 'src/render/frontend/qrenderattachment.cpp')
-rw-r--r--src/render/frontend/qrenderattachment.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/render/frontend/qrenderattachment.cpp b/src/render/frontend/qrenderattachment.cpp
index 9070876d9..d3cd769ea 100644
--- a/src/render/frontend/qrenderattachment.cpp
+++ b/src/render/frontend/qrenderattachment.cpp
@@ -62,6 +62,7 @@ void QRenderAttachmentPrivate::copy(const QNodePrivate *ref)
QNodePrivate::copy(ref);
const QRenderAttachmentPrivate *rA = static_cast<const QRenderAttachmentPrivate *>(ref);
m_type = rA->m_type;
+ q_func()->setTexture(qobject_cast<QTexture *>(QNodePrivate::get(rA->m_texture)->clone()));
}
QRenderAttachment::QRenderAttachment(QNode *parent)
@@ -168,15 +169,6 @@ QString QRenderAttachment::name() const
return d->m_name;
}
-QNode *QRenderAttachment::doClone() const
-{
- Q_D(const QRenderAttachment);
- QRenderAttachment *clone = new QRenderAttachment();;
- clone->d_func()->copy(d_func());
- clone->setTexture(qobject_cast<QTexture *>(QNodePrivate::get(d->m_texture)->clone()));
- return clone;
-}
-
} // Qt3D
QT_END_NAMESPACE