The property() calls in the proeprty cache only require a QJSEngine now

Change-Id: Ic4a944b4f1dd02ad2f0284acad5f3135068f66df
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
This commit is contained in:
Lars Knoll 2014-12-30 15:54:58 +01:00 committed by Lars Knoll
parent 5cb8ca29c3
commit 2828ee37e2
3 changed files with 8 additions and 8 deletions

View 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)

View 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);

View 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