+ that->d()->m_model->emitItemsChanged(elementIndex, 1, roles);
+ }
+
+ ModelNodeMetaObject *mo = ModelNodeMetaObject::get(that->object());
+ if (mo->initialized())
+ mo->emitPropertyNotification(name->toQString().toUtf8());
+}
+
+ReturnedValue ModelObject::get(const Managed *m, String *name, bool *hasProperty)
+{
+ const ModelObject *that = static_cast<const ModelObject*>(m);
+ const ListLayout::Role *role = that->d()->m_model->m_listModel->getExistingRole(name);
+ if (!role)
+ return QObjectWrapper::get(m, name, hasProperty);
+ if (hasProperty)
+ *hasProperty = true;
+ const int elementIndex = that->d()->m_elementIndex;
+ QVariant value = that->d()->m_model->data(elementIndex, role->index);
+ return that->engine()->fromVariant(value);
+}
+
+void ModelObject::advanceIterator(Managed *m, ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attributes)
+{
+ ModelObject *that = static_cast<ModelObject*>(m);
+ ExecutionEngine *v4 = that->engine();
+ name->setM(0);
+ *index = UINT_MAX;
+ if (it->arrayIndex < uint(that->d()->m_model->m_listModel->roleCount())) {
+ Scope scope(that->engine());
+ const ListLayout::Role &role = that->d()->m_model->m_listModel->getExistingRole(it->arrayIndex);
+ ++it->arrayIndex;
+ ScopedString roleName(scope, v4->newString(role.name));
+ name->setM(roleName->d());
+ *attributes = QV4::Attr_Data;
+ QVariant value = that->d()->m_model->data(that->d()->m_elementIndex, role.index);
+ p->value = v4->fromVariant(value);
+ return;