aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsapi
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-02-20 12:51:02 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-02-21 15:47:10 +0000
commit30db7d94e002b5c5b29820050a2220ef06afa54c (patch)
treed132dae16610cfdd9ef71118ee377dadca1d37fc /src/qml/jsapi
parentba2ff45daae4e6167f7719ab1466023093031a75 (diff)
QML: Pass type minor version when creating property data
Depending on the type minor version recursive properties should be available or not. Check for that when resolving grouped properties. Fixes: QTBUG-33179 Change-Id: Id8f62befdc4a29d879710499e19d3d289bd18775 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsapi')
-rw-r--r--src/qml/jsapi/qjsengine_p.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/jsapi/qjsengine_p.h b/src/qml/jsapi/qjsengine_p.h
index 360c9df075..a77d710cff 100644
--- a/src/qml/jsapi/qjsengine_p.h
+++ b/src/qml/jsapi/qjsengine_p.h
@@ -109,8 +109,8 @@ public:
// These methods may be called from the QML loader thread
- inline QQmlPropertyCache *cache(QObject *obj);
- inline QQmlPropertyCache *cache(const QMetaObject *);
+ inline QQmlPropertyCache *cache(QObject *obj, int minorVersion = -1);
+ inline QQmlPropertyCache *cache(const QMetaObject *, int minorVersion = -1);
};
QJSEnginePrivate::Locker::Locker(const QJSEngine *e)
@@ -160,14 +160,14 @@ and deleted before the loader thread has a chance to use or reference it. This
can't currently happen as the cache holds a reference to the
QQmlPropertyCache until the QQmlEngine is destroyed.
*/
-QQmlPropertyCache *QJSEnginePrivate::cache(QObject *obj)
+QQmlPropertyCache *QJSEnginePrivate::cache(QObject *obj, int minorVersion)
{
if (!obj || QObjectPrivate::get(obj)->metaObject || QObjectPrivate::get(obj)->wasDeleted)
return nullptr;
Locker locker(this);
const QMetaObject *mo = obj->metaObject();
- return QQmlMetaType::propertyCache(mo);
+ return QQmlMetaType::propertyCache(mo, minorVersion);
}
/*!
@@ -179,12 +179,12 @@ exist for the lifetime of the QQmlEngine.
The returned cache is not referenced, so if it is to be stored, call addref().
*/
-QQmlPropertyCache *QJSEnginePrivate::cache(const QMetaObject *metaObject)
+QQmlPropertyCache *QJSEnginePrivate::cache(const QMetaObject *metaObject, int minorVersion)
{
Q_ASSERT(metaObject);
Locker locker(this);
- return QQmlMetaType::propertyCache(metaObject);
+ return QQmlMetaType::propertyCache(metaObject, minorVersion);
}