aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types/qqmllistmodel_p_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/types/qqmllistmodel_p_p.h')
-rw-r--r--src/qml/types/qqmllistmodel_p_p.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/qml/types/qqmllistmodel_p_p.h b/src/qml/types/qqmllistmodel_p_p.h
index 983394e68b..633ddae43d 100644
--- a/src/qml/types/qqmllistmodel_p_p.h
+++ b/src/qml/types/qqmllistmodel_p_p.h
@@ -157,13 +157,16 @@ namespace QV4 {
namespace Heap {
struct ModelObject : public QObjectWrapper {
- ModelObject(QObject *object, QQmlListModel *model, int elementIndex)
+ ModelObject(QObject *object, QQmlListModel *model)
: QObjectWrapper(object)
, m_model(model)
- , m_elementIndex(elementIndex)
- {}
+ {
+ QObjectPrivate *op = QObjectPrivate::get(object);
+ m_nodeModelMetaObject = static_cast<ModelNodeMetaObject *>(op->metaObject);
+ }
+ int elementIndex() const { return m_nodeModelMetaObject->m_elementIndex; }
QQmlListModel *m_model;
- int m_elementIndex;
+ ModelNodeMetaObject *m_nodeModelMetaObject;
};
}