diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-02-06 19:40:36 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2018-02-06 19:40:36 +0000 |
commit | 81b393227db1f28a3838ea9aa958d5e609fe0cdf (patch) | |
tree | 71bade271de1b7fe451f2cd505145979b9c4e34d /src/qml/types | |
parent | f252b5229dc291cbf0773d2252068b0b2a6d7c9e (diff) | |
parent | a9a9fa0c4737017aa4fc72b467eb45645d0912f0 (diff) |
Merge "Merge remote-tracking branch 'origin/5.10' into dev" into refs/staging/dev
Diffstat (limited to 'src/qml/types')
-rw-r--r-- | src/qml/types/qqmldelegatemodel.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp index 0e2de0da7a..ca19d68948 100644 --- a/src/qml/types/qqmldelegatemodel.cpp +++ b/src/qml/types/qqmldelegatemodel.cpp @@ -864,7 +864,7 @@ void QQmlDelegateModelPrivate::releaseIncubator(QQDMIncubationTask *incubationTa void QQmlDelegateModelPrivate::removeCacheItem(QQmlDelegateModelItem *cacheItem) { - int cidx = m_cache.indexOf(cacheItem); + int cidx = m_cache.lastIndexOf(cacheItem); if (cidx >= 0) { m_compositor.clearFlags(Compositor::Cache, cidx, 1, Compositor::CacheFlag); m_cache.removeAt(cidx); @@ -1021,11 +1021,11 @@ QObject *QQmlDelegateModelPrivate::object(Compositor::Group group, int index, QQ /* If asynchronous is true or the component is being loaded asynchronously due - to an ancestor being loaded asynchronously, item() may return 0. In this - case createdItem() will be emitted when the item is available. The item - at this stage does not have any references, so item() must be called again - to ensure a reference is held. Any call to item() which returns a valid item - must be matched by a call to release() in order to destroy the item. + to an ancestor being loaded asynchronously, object() may return 0. In this + case createdItem() will be emitted when the object is available. The object + at this stage does not have any references, so object() must be called again + to ensure a reference is held. Any call to object() which returns a valid object + must be matched by a call to release() in order to destroy the object. */ QObject *QQmlDelegateModel::object(int index, QQmlIncubator::IncubationMode incubationMode) { |