diff options
Diffstat (limited to 'src/qml/types/qqmllistmodel_p_p.h')
-rw-r--r-- | src/qml/types/qqmllistmodel_p_p.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/qml/types/qqmllistmodel_p_p.h b/src/qml/types/qqmllistmodel_p_p.h index 887f5a1edc..ddf77e52c0 100644 --- a/src/qml/types/qqmllistmodel_p_p.h +++ b/src/qml/types/qqmllistmodel_p_p.h @@ -162,11 +162,13 @@ namespace QV4 { namespace Heap { struct ModelObject : public QObjectWrapper { - ModelObject(QObject *object, QQmlListModel *model, int elementIndex) - : QObjectWrapper(object) - , m_model(model) - , m_elementIndex(elementIndex) - {} + void init(QObject *object, QQmlListModel *model, int elementIndex) + { + QObjectWrapper::init(object); + m_model = model; + m_elementIndex = elementIndex; + } + void destroy() { QObjectWrapper::destroy(); } QQmlListModel *m_model; int m_elementIndex; }; @@ -180,6 +182,7 @@ struct ModelObject : public QObjectWrapper static void advanceIterator(Managed *m, ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attributes); V4_OBJECT2(ModelObject, QObjectWrapper) + V4_NEEDS_DESTROY }; } // namespace QV4 |