aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlxmlhttprequest.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-01-11 16:30:29 +0100
committerLars Knoll <lars.knoll@digia.com>2015-01-21 13:18:55 +0100
commit47fbcb47771a36ab9fd0a4d5ede7b7504ab1410d (patch)
tree57f058746bcc842e2dda628ab5daa5d3096fae71 /src/qml/qml/qqmlxmlhttprequest.cpp
parent36662b60b09f636c3623057f8116e862f94ff440 (diff)
Get rid of all uses of Managed::engine()
Change-Id: I596f14554d81f5e9af9996294d96047f2e810bef Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlxmlhttprequest.cpp')
-rw-r--r--src/qml/qml/qqmlxmlhttprequest.cpp14
1 files changed, 7 insertions, 7 deletions
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<NamedNodeMap>();
+ 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>());
NamedNodeMap *r = static_cast<NamedNodeMap *>(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<NodeList>());
- QV4::ExecutionEngine *v4 = m->engine();
NodeList *r = static_cast<NodeList *>(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<NodeList>());
- QV4::ExecutionEngine *v4 = m->engine();
NodeList *r = static_cast<NodeList *>(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<QQmlXMLHttpRequestCtor *>(that)->engine());
Scoped<QQmlXMLHttpRequestCtor> ctor(scope, that->as<QQmlXMLHttpRequestCtor>());
if (!ctor)
- return that->engine()->throwTypeError();
+ return scope.engine->throwTypeError();
QQmlXMLHttpRequest *r = new QQmlXMLHttpRequest(scope.engine, scope.engine->v8Engine->networkAccessManager());
- Scoped<QQmlXMLHttpRequestWrapper> w(scope, that->engine()->memoryManager->alloc<QQmlXMLHttpRequestWrapper>(that->engine(), r));
+ Scoped<QQmlXMLHttpRequestWrapper> w(scope, scope.engine->memoryManager->alloc<QQmlXMLHttpRequestWrapper>(scope.engine, r));
ScopedObject proto(scope, ctor->d()->proto);
w->setPrototype(proto);
return w.asReturnedValue();