diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-06-22 00:09:24 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-06-22 21:54:09 +0200 |
commit | 522c91f41f857bf2b52881d0bea2e07468516a42 (patch) | |
tree | c2ed837e615e6495723abd5dce0b0dba681d8b99 /src/qml/qml/qqmlcontextwrapper.cpp | |
parent | 4af39f1d8e2371ea5d913493b23eabffc1fb22c6 (diff) |
Remove context parameter from Manged::put.
Change-Id: Ib99e726ffbb20463d45a8444b4fbdfe32cd6dbef
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcontextwrapper.cpp')
-rw-r--r-- | src/qml/qml/qqmlcontextwrapper.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp index 2413ebe00f..bae2e03825 100644 --- a/src/qml/qml/qqmlcontextwrapper.cpp +++ b/src/qml/qml/qqmlcontextwrapper.cpp @@ -262,27 +262,28 @@ Value QmlContextWrapper::get(Managed *m, String *name, bool *hasProperty) return Value::undefinedValue(); } -void QmlContextWrapper::put(Managed *m, ExecutionContext *ctx, String *name, const Value &value) +void QmlContextWrapper::put(Managed *m, String *name, const Value &value) { QmlContextWrapper *wrapper = m->as<QmlContextWrapper>(); + ExecutionEngine *v4 = m->engine(); if (!wrapper) - ctx->throwTypeError(); + v4->current->throwTypeError(); if (wrapper->isNullWrapper) { if (wrapper && wrapper->readOnly) { QString error = QLatin1String("Invalid write to global property \"") + name->toQString() + QLatin1Char('"'); - ctx->throwError(Value::fromString(ctx->engine->newString(error))); + v4->current->throwError(Value::fromString(v4->current->engine->newString(error))); } - Object::put(m, ctx, name, value); + Object::put(m, name, value); return; } PropertyAttributes attrs; Property *pd = wrapper->__getOwnProperty__(name, &attrs); if (pd) { - wrapper->putValue(ctx, pd, attrs, value); + wrapper->putValue(v4->current, pd, attrs, value); return; } @@ -296,7 +297,6 @@ void QmlContextWrapper::put(Managed *m, ExecutionContext *ctx, String *name, con // See QV8ContextWrapper::Getter for resolution order - QV8Engine *engine = wrapper->v8; QObject *scopeObject = wrapper->getScopeObject(); QHashedV4String propertystring(Value::fromString(name)); @@ -308,13 +308,13 @@ void QmlContextWrapper::put(Managed *m, ExecutionContext *ctx, String *name, con // Search scope object if (scopeObject && - QV4::QObjectWrapper::setQmlProperty(ctx, context, scopeObject, name, QV4::QObjectWrapper::CheckRevision, value)) + QV4::QObjectWrapper::setQmlProperty(v4->current, context, scopeObject, name, QV4::QObjectWrapper::CheckRevision, value)) return; scopeObject = 0; // Search context object if (context->contextObject && - QV4::QObjectWrapper::setQmlProperty(ctx, context, context->contextObject, name, QV4::QObjectWrapper::CheckRevision, value)) + QV4::QObjectWrapper::setQmlProperty(v4->current, context, context->contextObject, name, QV4::QObjectWrapper::CheckRevision, value)) return; context = context->parent; @@ -325,10 +325,10 @@ void QmlContextWrapper::put(Managed *m, ExecutionContext *ctx, String *name, con if (wrapper->readOnly) { QString error = QLatin1String("Invalid write to global property \"") + name->toQString() + QLatin1Char('"'); - ctx->throwError(error); + v4->current->throwError(error); } - Object::put(m, ctx, name, value); + Object::put(m, name, value); } void QmlContextWrapper::destroy(Managed *that) |