aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlmodels
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-03-20 12:19:01 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-03-23 09:58:41 +0100
commitba2fe5ec6cbd3c213377fd9bbf30bcc6508e9616 (patch)
tree9dd84362e57f2473e87780ee02efdca6a87c3374 /src/qmlmodels
parent29fc018b74de3869941438c1f51b3202f93e5198 (diff)
QQmlDelegateModel: Don't require a delegate to cancel an incubation
It is actually not needed, and declining to cancel the incubation leaks memory. Change-Id: I478ed2a4eef34bd27c716762a2fced1e9091607c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qmlmodels')
-rw-r--r--src/qmlmodels/qqmldelegatemodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qmlmodels/qqmldelegatemodel.cpp b/src/qmlmodels/qqmldelegatemodel.cpp
index a68631830d..02564a113a 100644
--- a/src/qmlmodels/qqmldelegatemodel.cpp
+++ b/src/qmlmodels/qqmldelegatemodel.cpp
@@ -651,7 +651,7 @@ QQmlDelegateModel::ReleaseFlags QQmlDelegateModel::release(QObject *item, QQmlIn
void QQmlDelegateModel::cancel(int index)
{
Q_D(QQmlDelegateModel);
- if (!d->m_delegate || index < 0 || index >= d->m_compositor.count(d->m_compositorGroup)) {
+ if (index < 0 || index >= d->m_compositor.count(d->m_compositorGroup)) {
qWarning() << "DelegateModel::cancel: index out range" << index << d->m_compositor.count(d->m_compositorGroup);
return;
}