aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlpropertycache_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlpropertycache_p.h')
-rw-r--r--src/qml/qml/qqmlpropertycache_p.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h
index 4da02037fa..18ae32ebf9 100644
--- a/src/qml/qml/qqmlpropertycache_p.h
+++ b/src/qml/qml/qqmlpropertycache_p.h
@@ -431,6 +431,8 @@ public:
void toMetaObjectBuilder(QMetaObjectBuilder &);
+ inline bool callJSFactoryMethod(QObject *object, void **args) const;
+
static bool determineMetaObjectSizes(const QMetaObject &mo, int *fieldCount, int *stringCount);
static bool addToHash(QCryptographicHash &hash, const QMetaObject &mo);
@@ -505,6 +507,7 @@ private:
QByteArray _dynamicStringData;
QString _defaultPropertyName;
QQmlPropertyCacheMethodArguments *argumentsCache;
+ int _jsFactoryMethodIndex;
QByteArray _checksum;
};
@@ -806,6 +809,17 @@ int QQmlPropertyCache::signalOffset() const
return signalHandlerIndexCacheStart;
}
+bool QQmlPropertyCache::callJSFactoryMethod(QObject *object, void **args) const
+{
+ if (_jsFactoryMethodIndex != -1) {
+ _metaObject->d.static_metacall(object, QMetaObject::InvokeMetaMethod, _jsFactoryMethodIndex, args);
+ return true;
+ }
+ if (_parent)
+ return _parent->callJSFactoryMethod(object, args);
+ return false;
+}
+
QQmlMetaObject::QQmlMetaObject()
{
}