diff options
author | Mike Krus <mike.krus@kdab.com> | 2019-05-08 19:23:15 +0100 |
---|---|---|
committer | Mike Krus <mike.krus@kdab.com> | 2019-05-28 14:22:32 +0100 |
commit | 50d41e6f0e7dd97f3d4cbd68423d59cacd4b7700 (patch) | |
tree | 72e10837382c709163ba10aaff07ef1967b0fdf9 /src/render | |
parent | 2cdd87235fd86d9f2c0e8500be8d429b4f85b64a (diff) |
Fix removal of components when they are destroyed
Automatic removal of components when they are destroyed is based on
connecting to the destroyed() signal. This however means that by the
time removeComponent() is called, the pointer is no longer a valid
QComponent (just a QNode). While accessing member data of derived
classes such as nodeId is fine, emitting signals from derived class
does nothing, and in some cases asserts.
Fix this by:
- doing the QComponent clean up from it's destructor
- implementing a separate method on QEntity to simply clear the now
partly invalid pointer from the list.
Change-Id: Id7632ee2ceaff6548c44c7a43ae40a0372febde9
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render')
0 files changed, 0 insertions, 0 deletions