diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2016-12-16 09:59:54 +0100 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2016-12-16 10:08:31 +0000 |
commit | 170f5a89b59f3489267aaede36d7728f90b2e114 (patch) | |
tree | 3c2cf812ceb7b54c1175074c6eaa91701d393a1e /src/core/changes/qcomponentremovedchange.cpp | |
parent | d4e062abfa98285c581c55f42fec590a3815c95f (diff) |
Only pass static metaobjects around and fix EntityLoader
- Ensure the notification changes only pass in static metaobjects.
- Make the EntityLoader use the AsynchronousIfNested incubation mode to avoid
cases where we could destroy something still being incubated
- Add a manual test to test this cases
This fixes the crashes occurring when using NodeInstantiators and EntityLoaders
as delegates.
Change-Id: I104c60b4be34cfb843a74dd09a8b96fdac44657d
Task-number: QTBUG-57655
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/core/changes/qcomponentremovedchange.cpp')
-rw-r--r-- | src/core/changes/qcomponentremovedchange.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/changes/qcomponentremovedchange.cpp b/src/core/changes/qcomponentremovedchange.cpp index e1625ac93..e0a940781 100644 --- a/src/core/changes/qcomponentremovedchange.cpp +++ b/src/core/changes/qcomponentremovedchange.cpp @@ -41,6 +41,7 @@ #include "qcomponentremovedchange_p.h" #include <Qt3DCore/qcomponent.h> #include <Qt3DCore/qentity.h> +#include <private/qnode_p.h> QT_BEGIN_NAMESPACE @@ -51,7 +52,7 @@ QComponentRemovedChangePrivate::QComponentRemovedChangePrivate(const QEntity *en : QSceneChangePrivate() , m_entityId(entity->id()) , m_componentId(component->id()) - , m_componentMetaObject(component->metaObject()) + , m_componentMetaObject(QNodePrivate::findStaticMetaObject(component->metaObject())) { } |