diff options
author | Liang Qi <liang.qi@qt.io> | 2018-05-04 09:28:23 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-05-04 10:08:56 +0200 |
commit | 2044d0a03bafa4597863eb2bf3ecb8fa6731ed57 (patch) | |
tree | 5f2c0d44742770dfcc1dabf1efd8021b21cfeba4 /src/qml/types | |
parent | 7b0cb855edcfdeb04e7d0d1c2545958877481ecc (diff) | |
parent | 717b57a9aae4c6d45cbcf91d390e42af56ab8061 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
src/qml/qml/qqmltypeloader.cpp
src/qml/qml/qqmltypeloader_p.h
Done-with: Simon Hausmann <simon.hausmann@qt.io>
Task-number: QTBUG-68091
Change-Id: I7c0ab3c9446ac50da07b58f54e24eb4587f7f28c
Diffstat (limited to 'src/qml/types')
-rw-r--r-- | src/qml/types/qqmldelegatemodel.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp index 2cfb740ebf..3863f9e968 100644 --- a/src/qml/types/qqmldelegatemodel.cpp +++ b/src/qml/types/qqmldelegatemodel.cpp @@ -903,10 +903,11 @@ void QQmlDelegateModelPrivate::removeCacheItem(QQmlDelegateModelItem *cacheItem) void QQmlDelegateModelPrivate::incubatorStatusChanged(QQDMIncubationTask *incubationTask, QQmlIncubator::Status status) { - Q_Q(QQmlDelegateModel); if (!isDoneIncubating(status)) return; + const QList<QQmlError> incubationTaskErrors = incubationTask->errors(); + QQmlDelegateModelItem *cacheItem = incubationTask->incubating; cacheItem->incubationTask = nullptr; incubationTask->incubating = nullptr; @@ -920,7 +921,7 @@ void QQmlDelegateModelPrivate::incubatorStatusChanged(QQDMIncubationTask *incuba emitCreatedItem(incubationTask, cacheItem->object); cacheItem->releaseObject(); } else if (status == QQmlIncubator::Error) { - qmlWarning(q, m_delegate->errors()) << "Error creating delegate"; + qmlWarning(m_delegate, incubationTaskErrors + m_delegate->errors()) << "Error creating delegate"; } if (!cacheItem->isObjectReferenced()) { @@ -1017,7 +1018,7 @@ QObject *QQmlDelegateModelPrivate::object(Compositor::Group group, int index, QQ if (QQmlAdaptorModelProxyInterface *proxy = qobject_cast<QQmlAdaptorModelProxyInterface *>(cacheItem)) { ctxt = new QQmlContextData; - ctxt->setParent(cacheItem->contextData); + ctxt->setParent(cacheItem->contextData, /*stronglyReferencedByParent*/true); ctxt->contextObject = proxy->proxiedObject(); } } |