summaryrefslogtreecommitdiffstats
path: root/src/core/aspects
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2016-02-26 13:01:46 +0000
committerSean Harmer <sean.harmer@kdab.com>2016-03-17 19:19:03 +0000
commit51119eb2d7711a9ac05d2b412bb99b12eef64974 (patch)
tree4ffbfea9293096bdff996ecee67a2b4d07688ef0 /src/core/aspects
parent77b27d26a73dd31f6dca2e0012021943f573f776 (diff)
Remove QAbstractAspect::onCleanup()
This was actually called both when unsetting a root entity and during final shutdown. Remove it and move work it was doing to the overrides of onUnregistered() for now. Will need another look when we finish this refactoring to also include backend node destruction. Task-number: QTBUG-51421 Change-Id: I2f96ede4006fea3a4766d15cf6e162452dd58321 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Diffstat (limited to 'src/core/aspects')
-rw-r--r--src/core/aspects/qabstractaspect.cpp4
-rw-r--r--src/core/aspects/qabstractaspect.h2
-rw-r--r--src/core/aspects/qaspectmanager.cpp10
3 files changed, 4 insertions, 12 deletions
diff --git a/src/core/aspects/qabstractaspect.cpp b/src/core/aspects/qabstractaspect.cpp
index edef2c19b..309fa3faf 100644
--- a/src/core/aspects/qabstractaspect.cpp
+++ b/src/core/aspects/qabstractaspect.cpp
@@ -142,10 +142,6 @@ QVector<QAspectJobPtr> QAbstractAspect::jobsToExecute(qint64 time)
return QVector<QAspectJobPtr>();
}
-void QAbstractAspect::onCleanup()
-{
-}
-
QBackendNode *QAbstractAspectPrivate::createBackendNode(QNode *frontend) const
{
const QMetaObject *metaObj = frontend->metaObject();
diff --git a/src/core/aspects/qabstractaspect.h b/src/core/aspects/qabstractaspect.h
index 079c1bbd8..3fd33a301 100644
--- a/src/core/aspects/qabstractaspect.h
+++ b/src/core/aspects/qabstractaspect.h
@@ -84,8 +84,6 @@ private:
virtual void onRegistered();
virtual void onUnregistered();
- virtual void onCleanup();
-
virtual void onEngineStartup();
virtual void onEngineShutdown();
diff --git a/src/core/aspects/qaspectmanager.cpp b/src/core/aspects/qaspectmanager.cpp
index aacf753e4..903d5b219 100644
--- a/src/core/aspects/qaspectmanager.cpp
+++ b/src/core/aspects/qaspectmanager.cpp
@@ -130,10 +130,9 @@ void QAspectManager::shutdown()
{
qCDebug(Aspects) << Q_FUNC_INFO;
- for (QAbstractAspect *aspect : qAsConst(m_aspects)) {
- aspect->onCleanup();
+ for (QAbstractAspect *aspect : qAsConst(m_aspects))
m_changeArbiter->unregisterSceneObserver(aspect->d_func());
- }
+
// Aspects must be deleted in the Thread they were created in
}
@@ -145,9 +144,8 @@ void QAspectManager::setRootEntity(Qt3DCore::QEntity *root)
return;
if (m_root) {
- // Allow each aspect chance to cleanup any resources from this scene
- for (QAbstractAspect *aspect : qAsConst(m_aspects))
- aspect->onCleanup();
+ // TODO: Delete all backend nodes. This is to be symmetric with how
+ // we create them below in the call to setRootAndCreateNodes
}
m_root = root;