diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-06-03 16:29:16 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2013-06-03 20:39:04 +0200 |
commit | 94946e6fb412a34f1d0bd3bb550a8ff195976ee6 (patch) | |
tree | 3644287597da1bb0a246552c8fee82b34f01ac6b /src/qml/qml/qqmlcontextwrapper.cpp | |
parent | a336ca4cc35fdcabedf4ff2614cc6d6625e7d4ef (diff) |
Fix regression with meta object revision checking
Commit 00a07bcbd7a592072822b0e55ab2e75e90c3f9f5 replaced the CheckRevision
parameter on the call GetProperty on the scope QObject with a get that
would do IgnoreRevision.
This adds a property getter on the QV4::QObjectWrapper that allows for checking
the meta object revision. The plan is to move all of the property getter code
from QV8QObjectWrapper into QV4::QObjectWrapper incrementally.
Change-Id: I8e5a93ce3351a8c5dba13f14cd43e4036875b792
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcontextwrapper.cpp')
-rw-r--r-- | src/qml/qml/qqmlcontextwrapper.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp index a4b8349aa8..f9dc3a3fc3 100644 --- a/src/qml/qml/qqmlcontextwrapper.cpp +++ b/src/qml/qml/qqmlcontextwrapper.cpp @@ -229,10 +229,9 @@ Value QmlContextWrapper::get(Managed *m, ExecutionContext *ctx, String *name, bo // Search scope object if (scopeObject) { - QV4::Value wrapper = qobjectWrapper->newQObject(scopeObject)->v4Value(); - if (QV4::Object *o = wrapper.asObject()) { + if (QV4::QObjectWrapper *o = qobjectWrapper->newQObject(scopeObject)->v4Value().as<QV4::QObjectWrapper>()) { bool hasProp = false; - QV4::Value result = o->get(o->engine()->current, propertystring.string().asString(), &hasProp); + QV4::Value result = o->getProperty(o->engine()->current, propertystring.string().asString(), QV4::QObjectWrapper::CheckRevision, &hasProp); if (hasProp) { if (hasProperty) *hasProperty = true; @@ -246,7 +245,7 @@ Value QmlContextWrapper::get(Managed *m, ExecutionContext *ctx, String *name, bo // Search context object if (context->contextObject) { QV4::Value result = qobjectWrapper->getProperty(context->contextObject, propertystring, - context, QV8QObjectWrapper::CheckRevision)->v4Value(); + context, QV4::QObjectWrapper::CheckRevision)->v4Value(); if (!result.isEmpty()) { if (hasProperty) *hasProperty = true; @@ -299,14 +298,14 @@ void QmlContextWrapper::put(Managed *m, ExecutionContext *ctx, String *name, con // Search scope object if (scopeObject && - qobjectWrapper->setProperty(scopeObject, propertystring, context, value, QV8QObjectWrapper::CheckRevision)) + qobjectWrapper->setProperty(scopeObject, propertystring, context, value, QV4::QObjectWrapper::CheckRevision)) return; scopeObject = 0; // Search context object if (context->contextObject && qobjectWrapper->setProperty(context->contextObject, propertystring, context, value, - QV8QObjectWrapper::CheckRevision)) + QV4::QObjectWrapper::CheckRevision)) return; context = context->parent; |