If the item is not removed from the cache when it is deleted then the
cache can end up pointing to an invalid item which when accessed will
cause a crash.
Task-number: QTBUG-38430
[ChangeLog][QtQml] Prevent a crash when the item is deleted
but is not removed from the QQmlDelegateModel's cache.
Change-Id: I8cf76b014be62a432d909a3573231cec84a6d678
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
QQmlDelegateModelItemMetaType * const metaType;
QQmlContextData *contextData;
QObject *object;
- QQmlDelegateModelAttached *attached;
+ QPointer<QQmlDelegateModelAttached> attached;
QQDMIncubationTask *incubationTask;
int objectRef;
int scriptRef;