You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
891 B

--- src/qml/util/qqmladaptormodel.cpp.orig 2016-05-27 17:06:31.192332166 -0300
+++ src/qml/util/qqmladaptormodel.cpp 2016-05-27 18:37:27.764552053 -0300
@@ -163,8 +163,14 @@ public:
signalIndexes.append(propertyId + signalOffset);
}
- for (int i = 0, c = items.count(); i < c; ++i) {
- QQmlDelegateModelItem *item = items.at(i);
+ const QList<QQmlDelegateModelItem *> copy = items;
+ for (int i = 0, c = copy.count(); i < c; ++i) {
+ // Applying the same logic used in QQmlDelegateModel::_q_itemsRemoved().
+ QQmlDelegateModelItem *item = copy.at(i);
+ if (!items.contains(item)) {
+ continue;
+ }
+
const int idx = item->modelIndex();
if (idx >= index && idx < index + count) {
for (int i = 0; i < signalIndexes.count(); ++i)