From 47fbcb47771a36ab9fd0a4d5ede7b7504ab1410d Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sun, 11 Jan 2015 16:30:29 +0100 Subject: Get rid of all uses of Managed::engine() Change-Id: I596f14554d81f5e9af9996294d96047f2e810bef Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlxmlhttprequest.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/qml/qml/qqmlxmlhttprequest.cpp') diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index 6d730970b3..7c4413a500 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -872,8 +872,8 @@ bool Node::isNull() const ReturnedValue NamedNodeMap::getIndexed(Managed *m, uint index, bool *hasProperty) { - QV4::ExecutionEngine *v4 = m->engine(); NamedNodeMap *r = m->as(); + QV4::ExecutionEngine *v4 = r->engine(); if (!r) { if (hasProperty) *hasProperty = false; @@ -894,7 +894,7 @@ ReturnedValue NamedNodeMap::get(Managed *m, String *name, bool *hasProperty) { Q_ASSERT(m->as()); NamedNodeMap *r = static_cast(m); - QV4::ExecutionEngine *v4 = m->engine(); + QV4::ExecutionEngine *v4 = r->engine(); name->makeIdentifier(v4); if (name->equals(v4->id_length)) @@ -922,8 +922,8 @@ ReturnedValue NamedNodeMap::create(ExecutionEngine *v4, NodeImpl *data, const QL ReturnedValue NodeList::getIndexed(Managed *m, uint index, bool *hasProperty) { Q_ASSERT(m->as()); - QV4::ExecutionEngine *v4 = m->engine(); NodeList *r = static_cast(m); + QV4::ExecutionEngine *v4 = r->engine(); if ((int)index < r->d()->d->children.count()) { if (hasProperty) @@ -938,8 +938,8 @@ ReturnedValue NodeList::getIndexed(Managed *m, uint index, bool *hasProperty) ReturnedValue NodeList::get(Managed *m, String *name, bool *hasProperty) { Q_ASSERT(m->as()); - QV4::ExecutionEngine *v4 = m->engine(); NodeList *r = static_cast(m); + QV4::ExecutionEngine *v4 = r->engine(); name->makeIdentifier(v4); @@ -1614,13 +1614,13 @@ struct QQmlXMLHttpRequestCtor : public FunctionObject } static ReturnedValue construct(Managed *that, QV4::CallData *) { - Scope scope(that->engine()); + Scope scope(static_cast(that)->engine()); Scoped ctor(scope, that->as()); if (!ctor) - return that->engine()->throwTypeError(); + return scope.engine->throwTypeError(); QQmlXMLHttpRequest *r = new QQmlXMLHttpRequest(scope.engine, scope.engine->v8Engine->networkAccessManager()); - Scoped w(scope, that->engine()->memoryManager->alloc(that->engine(), r)); + Scoped w(scope, scope.engine->memoryManager->alloc(scope.engine, r)); ScopedObject proto(scope, ctor->d()->proto); w->setPrototype(proto); return w.asReturnedValue(); -- cgit v1.2.3