aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types/qqmldelegatemodel_p_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-04-30 20:29:39 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2014-07-22 13:49:09 +0200
commit2338bb1faac05c87575495d324be6b8c5066479a (patch)
tree46c92157ec0865e2dfbd7c48c53b0b7c7a73bf9c /src/qml/types/qqmldelegatemodel_p_p.h
parentfb4edc2359b3761f0f01afac33b8441bbbda22ab (diff)
Fix QQmlDelegateModelChangeArray
The class had a vtable, clashing with assumptions about Managed objects. The derived classes where actually only cosmetic sugar on top of the basic change class. Clean this up and unify the functionality in the base class. In addition adjust the class to the new data layout. Change-Id: I8677f6c71465381f7ebdf82eb6025fda6d137ec3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/types/qqmldelegatemodel_p_p.h')
-rw-r--r--src/qml/types/qqmldelegatemodel_p_p.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/qml/types/qqmldelegatemodel_p_p.h b/src/qml/types/qqmldelegatemodel_p_p.h
index cf7a719455..3e8cfd32b3 100644
--- a/src/qml/types/qqmldelegatemodel_p_p.h
+++ b/src/qml/types/qqmldelegatemodel_p_p.h
@@ -161,16 +161,24 @@ protected:
struct QQmlDelegateModelItemObject : QV4::Object
{
- V4_OBJECT;
+ struct Data : QV4::Object::Data {
+ QQmlDelegateModelItem *item;
+ };
+ struct {
+ QQmlDelegateModelItem *item;
+ } __data;
+
+ V4_OBJECT_NEW
+
QQmlDelegateModelItemObject(QV4::ExecutionEngine *engine, QQmlDelegateModelItem *item)
: Object(engine)
- , item(item)
- { setVTable(staticVTable()); }
+ {
+ setVTable(staticVTable());
+ d()->item = item;
+ }
~QQmlDelegateModelItemObject();
static void destroy(Managed *that);
-
- QQmlDelegateModelItem *item;
};
@@ -275,12 +283,12 @@ public:
void itemsInserted(
const QVector<Compositor::Insert> &inserts,
- QVarLengthArray<QVector<QQmlChangeSet::Insert>, Compositor::MaximumGroupCount> *translatedInserts,
+ QVarLengthArray<QVector<QQmlChangeSet::Change>, Compositor::MaximumGroupCount> *translatedInserts,
QHash<int, QList<QQmlDelegateModelItem *> > *movedItems = 0);
void itemsInserted(const QVector<Compositor::Insert> &inserts);
void itemsRemoved(
const QVector<Compositor::Remove> &removes,
- QVarLengthArray<QVector<QQmlChangeSet::Remove>, Compositor::MaximumGroupCount> *translatedRemoves,
+ QVarLengthArray<QVector<QQmlChangeSet::Change>, Compositor::MaximumGroupCount> *translatedRemoves,
QHash<int, QList<QQmlDelegateModelItem *> > *movedItems = 0);
void itemsRemoved(const QVector<Compositor::Remove> &removes);
void itemsMoved(