summaryrefslogtreecommitdiffstats
path: root/src/render/frontend/framegraph-components/qframegraphnode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/frontend/framegraph-components/qframegraphnode.cpp')
-rw-r--r--src/render/frontend/framegraph-components/qframegraphnode.cpp42
1 files changed, 11 insertions, 31 deletions
diff --git a/src/render/frontend/framegraph-components/qframegraphnode.cpp b/src/render/frontend/framegraph-components/qframegraphnode.cpp
index d3cf5f835..fadf049b8 100644
--- a/src/render/frontend/framegraph-components/qframegraphnode.cpp
+++ b/src/render/frontend/framegraph-components/qframegraphnode.cpp
@@ -62,48 +62,28 @@ QFrameGraphNodePrivate::QFrameGraphNodePrivate(QFrameGraphNode *qq)
{
}
-void QFrameGraphNode::copy(const QNode *ref)
-{
- QNode::copy(ref);
- const QFrameGraphNode *refNode = static_cast<const QFrameGraphNode *>(ref);
- Q_FOREACH (QFrameGraphNode *fgChild, refNode->d_func()->m_fgChildren)
- appendFrameGraphNode(qobject_cast<QFrameGraphNode *>(QNode::clone(fgChild)));
-
-}
-
QFrameGraphNode::QFrameGraphNode(QNode *parent)
: QNode(*new QFrameGraphNodePrivate(this), parent)
{
}
-/*! \internal */
-QFrameGraphNode::QFrameGraphNode(QFrameGraphNodePrivate &dd, QNode *parent)
- : QNode(dd, parent)
+QFrameGraphNode *QFrameGraphNode::parentFrameGraphNode() const
{
-}
+ QFrameGraphNode *parentFGNode = Q_NULLPTR;
+ QNode *parentN = parentNode();
-void QFrameGraphNode::appendFrameGraphNode(QFrameGraphNode *item)
-{
- Q_D(QFrameGraphNode);
- if (!d->m_fgChildren.contains(item)) {
- if (!item->parent())
- item->setParent(this);
- d->m_fgChildren.append(item);
+ while (parentN) {
+ if ((parentFGNode = qobject_cast<QFrameGraphNode *>(parentN)) != Q_NULLPTR)
+ break;
+ parentN = parentN->parentNode();
}
+ return parentFGNode;
}
-void QFrameGraphNode::removeFrameGraphNode(QFrameGraphNode *item)
-{
- Q_D(QFrameGraphNode);
- if (!d->m_fgChildren.contains(item)) {
- d->m_fgChildren.removeOne(item);
- }
-}
-
-QList<QFrameGraphNode *> QFrameGraphNode::frameGraphChildren() const
+/*! \internal */
+QFrameGraphNode::QFrameGraphNode(QFrameGraphNodePrivate &dd, QNode *parent)
+ : QNode(dd, parent)
{
- Q_D(const QFrameGraphNode);
- return d->m_fgChildren;
}
/*!