summaryrefslogtreecommitdiffstats
path: root/src/core/core-components/qabstracttechnique.cpp
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2014-09-29 17:19:36 +0200
committerSean Harmer <sean.harmer@kdab.com>2014-10-03 21:18:41 +0200
commit7b26f6a1746419161a8f875e341b3e31220f4141 (patch)
treef784e568015e1f7f199abb388b97fefdb158c84e /src/core/core-components/qabstracttechnique.cpp
parentc16689bb1ccf31416df7b8c69fe032898cf87dec (diff)
QNode refactoring
Move almost everything to private classes. Assimp loading restored. All examples working. QNode hierachy is now handled through QObject::setParent, addChild, removeChild are part of the private api. Note: commented QChangeArbiter unit tests as they can no longer work with this patch and will restore them when QChangeArbiter will have been made private. Task-number: QTBUG-41470 Task-number: QTBUG-41523 Change-Id: I4430974b3aa7f3744c38714b451b122e0cb4d0c9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/core/core-components/qabstracttechnique.cpp')
-rw-r--r--src/core/core-components/qabstracttechnique.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/core-components/qabstracttechnique.cpp b/src/core/core-components/qabstracttechnique.cpp
index 12bc2e7a0..d9c9f04b1 100644
--- a/src/core/core-components/qabstracttechnique.cpp
+++ b/src/core/core-components/qabstracttechnique.cpp
@@ -98,14 +98,14 @@ void QAbstractTechnique::addPass(QAbstractRenderPass *pass)
// Or not previously added as a child of the current node so that
// 1) The backend gets notified about it's creation
// 2) When the current node is destroyed, it gets destroyed as well
- if (!pass->parent() || pass->parent() == this)
- QNode::addChild(pass);
+ if (!pass->parent())
+ pass->setParent(this);
if (d->m_changeArbiter != Q_NULLPTR) {
QScenePropertyChangePtr e(new QScenePropertyChange(NodeAdded, this));
e->setPropertyName(QByteArrayLiteral("pass"));
e->setValue(QVariant::fromValue(pass));
- notifyObservers(e);
+ d->notifyObservers(e);
}
}
}
@@ -122,7 +122,7 @@ void QAbstractTechnique::removePass(QAbstractRenderPass *pass)
QScenePropertyChangePtr e(new QScenePropertyChange(NodeRemoved, this));
e->setPropertyName(QByteArrayLiteral("pass"));
e->setValue(QVariant::fromValue(pass->uuid()));
- notifyObservers(e);
+ d->notifyObservers(e);
}
d->m_renderPasses.removeOne(pass);
}