The property() calls in the proeprty cache only require a QJSEngine now
authorLars Knoll <lars.knoll@theqtcompany.com>
Tue, 30 Dec 2014 14:54:58 +0000 (15:54 +0100)
committerLars Knoll <lars.knoll@digia.com>
Thu, 8 Jan 2015 11:34:14 +0000 (12:34 +0100)
Change-Id: Ic4a944b4f1dd02ad2f0284acad5f3135068f66df
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/jsruntime/qv4qobjectwrapper.cpp
src/qml/qml/qqmlpropertycache.cpp
src/qml/qml/qqmlpropertycache_p.h

index 9355f31..8a59cb7 100644 (file)
@@ -257,7 +257,7 @@ QQmlPropertyData *QObjectWrapper::findProperty(ExecutionEngine *engine, QQmlCont
     if (ddata && ddata->propertyCache)
         result = ddata->propertyCache->property(name, d()->object, qmlContext);
     else
-        result = QQmlPropertyCache::property(engine->v8Engine->engine(), d()->object, name, qmlContext, *local);
+        result = QQmlPropertyCache::property(engine->jsEngine(), d()->object, name, qmlContext, *local);
     return result;
 }
 
@@ -428,7 +428,7 @@ bool QObjectWrapper::setQmlProperty(ExecutionEngine *engine, QQmlContextData *qm
     QQmlPropertyData local;
     QQmlPropertyData *result = 0;
     {
-        result = QQmlPropertyCache::property(engine->v8Engine->engine(), object, name, qmlContext, local);
+        result = QQmlPropertyCache::property(engine->jsEngine(), object, name, qmlContext, local);
     }
 
     if (!result)
index 182e6a7..3afc8c0 100644 (file)
@@ -1269,7 +1269,7 @@ inline QString qQmlPropertyCacheToString(const QV4::String *string)
 
 template<typename T>
 QQmlPropertyData *
-qQmlPropertyCacheProperty(QQmlEngine *engine, QObject *obj, T name,
+qQmlPropertyCacheProperty(QJSEngine *engine, QObject *obj, T name,
                           QQmlContextData *context, QQmlPropertyData &local)
 {
     QQmlPropertyCache *cache = 0;
@@ -1279,7 +1279,7 @@ qQmlPropertyCacheProperty(QQmlEngine *engine, QObject *obj, T name,
     if (ddata && ddata->propertyCache) {
         cache = ddata->propertyCache;
     } else if (engine) {
-        QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine);
+        QJSEnginePrivate *ep = QJSEnginePrivate::get(engine);
         cache = ep->cache(obj);
         if (cache) {
             ddata = QQmlData::get(obj, true);
@@ -1302,14 +1302,14 @@ qQmlPropertyCacheProperty(QQmlEngine *engine, QObject *obj, T name,
 }
 
 QQmlPropertyData *
-QQmlPropertyCache::property(QQmlEngine *engine, QObject *obj, const QV4::String *name,
+QQmlPropertyCache::property(QJSEngine *engine, QObject *obj, const QV4::String *name,
                             QQmlContextData *context, QQmlPropertyData &local)
 {
     return qQmlPropertyCacheProperty<const QV4::String *>(engine, obj, name, context, local);
 }
 
 QQmlPropertyData *
-QQmlPropertyCache::property(QQmlEngine *engine, QObject *obj,
+QQmlPropertyCache::property(QJSEngine *engine, QObject *obj,
                                     const QString &name, QQmlContextData *context, QQmlPropertyData &local)
 {
     return qQmlPropertyCacheProperty<const QString &>(engine, obj, name, context, local);
index 033ff1d..2b8a129 100644 (file)
@@ -303,9 +303,9 @@ public:
     inline QQmlPropertyData *overrideData(QQmlPropertyData *) const;
     inline bool isAllowedInRevision(QQmlPropertyData *) const;
 
-    static QQmlPropertyData *property(QQmlEngine *, QObject *, const QString &,
+    static QQmlPropertyData *property(QJSEngine *, QObject *, const QString &,
                                               QQmlContextData *, QQmlPropertyData &);
-    static QQmlPropertyData *property(QQmlEngine *, QObject *, const QV4::String *,
+    static QQmlPropertyData *property(QJSEngine *, QObject *, const QV4::String *,
                                               QQmlContextData *, QQmlPropertyData &);
 
     //see QMetaObjectPrivate::originalClone