diff --git a/src/core/model.cpp b/src/core/model.cpp index 9aaa1472..bcba6a15 100644 --- a/src/core/model.cpp +++ b/src/core/model.cpp @@ -39,7 +39,7 @@ QObject* UntypedObjectModel::valueAt(QQmlListProperty* property, qsizet void UntypedObjectModel::insertObject(QObject* object, qsizetype index) { auto iindex = index == -1 ? this->valuesList.length() : index; - emit this->objectInsertedPre(object, index); + emit this->objectInsertedPre(object, iindex); auto intIndex = static_cast(iindex); this->beginInsertRows(QModelIndex(), intIndex, intIndex); @@ -47,7 +47,7 @@ void UntypedObjectModel::insertObject(QObject* object, qsizetype index) { this->endInsertRows(); emit this->valuesChanged(); - emit this->objectInsertedPost(object, index); + emit this->objectInsertedPost(object, iindex); } void UntypedObjectModel::removeAt(qsizetype index) {