aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickcontainer.cpp
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2019-06-27 16:55:41 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2019-07-03 09:01:35 +0200
commitce7c431fb23157fa5125d1102a594de045818a72 (patch)
tree9afbbec944b4d37839568ec6f391c10f4e929da9 /src/quicktemplates2/qquickcontainer.cpp
parent3574033d526c0a78236148354e1f48d7b9aafe10 (diff)
Fix crash in QQuickContainerPrivate::removeItem
The count variable should be updated after removing the item. Fixes: QTBUG-76164 Change-Id: I141d720ffaa890002d98a7d2448adca9a7d7d2f3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickcontainer.cpp')
-rw-r--r--src/quicktemplates2/qquickcontainer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickcontainer.cpp b/src/quicktemplates2/qquickcontainer.cpp
index 8314230c..609c2079 100644
--- a/src/quicktemplates2/qquickcontainer.cpp
+++ b/src/quicktemplates2/qquickcontainer.cpp
@@ -306,6 +306,7 @@ void QQuickContainerPrivate::removeItem(int index, QQuickItem *item)
QQuickItemPrivate::get(item)->removeItemChangeListener(this, changeTypes);
item->setParentItem(nullptr);
contentModel->remove(index);
+ --count;
q->itemRemoved(index, item);