diff options
author | Liang Qi <liang.qi@qt.io> | 2016-10-10 09:28:12 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-10-10 16:01:48 +0200 |
commit | 102fa9b6db82ecd2b95d168912fde0c8bc3798b3 (patch) | |
tree | 5bf934c323dcafb67cb508ace579110191ad782d /src/qml/qml/qqmlpropertycache.cpp | |
parent | a6be2d77aa6dc9f834b971eaff749a02cf982525 (diff) | |
parent | fff4477661ae240c43088fa6d9069ccf969dbee8 (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
examples/quick/quickwidgets/quickwidget/main.cpp
src/qml/jsruntime/qv4jsonobject.cpp
src/qml/jsruntime/qv4qobjectwrapper.cpp
src/qml/jsruntime/qv4qobjectwrapper_p.h
src/qml/qml/qqmlengine.cpp
src/qml/qml/qqmlpropertycache.cpp
src/qml/qml/qqmlpropertycache_p.h
src/quick/items/qquickanimatedsprite.cpp
src/quick/items/qquickitem.cpp
src/quick/items/qquickitem.h
src/quick/items/qquickitem_p.h
src/quick/items/qquickview_p.h
src/quick/scenegraph/qsgcontext.cpp
src/quick/scenegraph/qsgdefaultrendercontext.cpp
Change-Id: I172c6fbff97208f21ed4c8b6db3d1747a889f22b
Diffstat (limited to 'src/qml/qml/qqmlpropertycache.cpp')
-rw-r--r-- | src/qml/qml/qqmlpropertycache.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index 337c37b5be..f75ab9e25b 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -246,7 +246,7 @@ Creates a new empty QQmlPropertyCache. QQmlPropertyCache::QQmlPropertyCache(QV4::ExecutionEngine *e) : engine(e), _parent(0), propertyIndexCacheStart(0), methodIndexCacheStart(0), signalHandlerIndexCacheStart(0), _hasPropertyOverrides(false), _ownMetaObject(false), - _metaObject(0), argumentsCache(0) + _metaObject(0), argumentsCache(0), _jsFactoryMethodIndex(-1) { Q_ASSERT(engine); } @@ -507,6 +507,11 @@ void QQmlPropertyCache::append(const QMetaObject *metaObject, const char *name = mci.name(); if (0 == qstrcmp(name, "DefaultProperty")) { _defaultPropertyName = QString::fromUtf8(mci.value()); + } else if (0 == qstrcmp(name, "qt_QmlJSWrapperFactoryMethod")) { + const char * const factoryMethod = mci.value(); + _jsFactoryMethodIndex = metaObject->indexOfSlot(factoryMethod); + if (_jsFactoryMethodIndex != -1) + _jsFactoryMethodIndex -= metaObject->methodOffset(); } } } |