diff options
Diffstat (limited to 'src/qml/types')
-rw-r--r-- | src/qml/types/qqmldelegatemodel.cpp | 4 | ||||
-rw-r--r-- | src/qml/types/qqmllistmodel.cpp | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp index 32ebb93279..40150d62ba 100644 --- a/src/qml/types/qqmldelegatemodel.cpp +++ b/src/qml/types/qqmldelegatemodel.cpp @@ -1692,7 +1692,7 @@ int QQmlDelegateModelItemMetaType::parseGroups(const QV4::ValueRef groups) const QV4::ScopedArrayObject array(scope, groups); if (array) { QV4::ScopedValue v(scope); - uint arrayLength = array->arrayLength(); + uint arrayLength = array->getLength(); for (uint i = 0; i < arrayLength; ++i) { v = array->getIndexed(i); const QString groupName = v->toQString(); @@ -3189,7 +3189,7 @@ public: : Object(engine) { setVTable(&static_vtbl); - flags &= ~SimpleArray; + setArrayType(QV4::ArrayData::Custom); } virtual ~QQmlDelegateModelGroupChangeArray() {} diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp index 7e441023c9..eeb4aa0861 100644 --- a/src/qml/types/qqmllistmodel.cpp +++ b/src/qml/types/qqmllistmodel.cpp @@ -441,7 +441,7 @@ void ListModel::set(int elementIndex, QV4::ObjectRef object, QVector<int> *roles const ListLayout::Role &r = m_layout->getRoleOrCreate(propertyName, ListLayout::Role::List); ListModel *subModel = new ListModel(r.subLayout, 0, -1); - int arrayLength = a->arrayLength(); + int arrayLength = a->getLength(); for (int j=0 ; j < arrayLength ; ++j) { o = a->getIndexed(j); subModel->append(o, eng); @@ -517,7 +517,7 @@ void ListModel::set(int elementIndex, QV4::ObjectRef object, QV8Engine *eng) if (r.type == ListLayout::Role::List) { ListModel *subModel = new ListModel(r.subLayout, 0, -1); - int arrayLength = a->arrayLength(); + int arrayLength = a->getLength(); for (int j=0 ; j < arrayLength ; ++j) { o = a->getIndexed(j); subModel->append(o, eng); @@ -1188,7 +1188,7 @@ int ListElement::setJsProperty(const ListLayout::Role &role, const QV4::ValueRef QV4::Scoped<QV4::Object> o(scope); ListModel *subModel = new ListModel(role.subLayout, 0, -1); - int arrayLength = a->arrayLength(); + int arrayLength = a->getLength(); for (int j=0 ; j < arrayLength ; ++j) { o = a->getIndexed(j); subModel->append(o, eng); @@ -1953,7 +1953,7 @@ void QQmlListModel::insert(QQmlV4Function *args) if (objectArray) { QV4::ScopedObject argObject(scope); - int objectArrayLength = objectArray->arrayLength(); + int objectArrayLength = objectArray->getLength(); for (int i=0 ; i < objectArrayLength ; ++i) { argObject = objectArray->getIndexed(i); @@ -2055,7 +2055,7 @@ void QQmlListModel::append(QQmlV4Function *args) if (objectArray) { QV4::Scoped<QV4::Object> argObject(scope); - int objectArrayLength = objectArray->arrayLength(); + int objectArrayLength = objectArray->getLength(); int index = count(); for (int i=0 ; i < objectArrayLength ; ++i) { |