diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2018-10-31 13:02:51 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2019-02-21 10:55:03 +0000 |
commit | 99e2356a734fa3eb55ffc2e983658d17ab4c3e9f (patch) | |
tree | 6bcb7aa33c0cee20a363fb4c0378acd635cefbd2 /src/qml/types/qqmlbind.cpp | |
parent | 3b9ecd6174a7a6eacf22b5088b66b203160bfdbd (diff) |
QQmlAdaptorModel::Accessors: create a propertyCache for all accessors, not just for QAIM
From before, only accessors for wrapping a QAbstractItemModel
had to create a dynamic QMetaObject together with a shared
QQmlPropertyCache (for enabling model roles in the delegate).
Each model item in the view would get a QQmlData with the dynamic
property cache assigned, which would then later be used by the
v4 runtime during property lookup.
But after we added the properties 'row' and 'column' to the model items, we
now always need to create a property cache, regardless of the Accessor used.
That way we can we specify the correct metaObject revision of the model item
in the cache, which will also allow us to revision the new properties so that
they will be respected by the v4 runtime. In this patch we hard-code the revision
(modelItemRevision) to be 0, but this will change in a subsequent patch.
This patch will move the 'metaObject' and 'propertyCache' up to the base
class (Accessor), and ensure that we create a property cache for each of the
non-pure-virtual sub classes. The model item wrappers will then, when creating
a QQmlData, assign the shared cache from the associated Accessor.
Task-number: QTBUG-70031
Change-Id: If6a67d5968d360d4a2b23d8291669c0549e8a342
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/types/qqmlbind.cpp')
0 files changed, 0 insertions, 0 deletions