From 5f162e17ed84a7af9c7b17a2538ed8b870685b8f Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 15 Jun 2015 16:41:24 +0200 Subject: Cleanup retrieval of scope and context objects Change-Id: I9c6174181f950bc4f829727dc6acdfe82fa4e894 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlcontextwrapper.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/qml/qml/qqmlcontextwrapper.cpp') diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp index 3d704d0b4e..fd85b64ad1 100644 --- a/src/qml/qml/qqmlcontextwrapper.cpp +++ b/src/qml/qml/qqmlcontextwrapper.cpp @@ -93,14 +93,6 @@ ReturnedValue QmlContextWrapper::urlScope(ExecutionEngine *v4, const QUrl &url) return w.asReturnedValue(); } -QQmlContextData *QmlContextWrapper::callingContext(ExecutionEngine *v4) -{ - Scope scope(v4); - QV4::Scoped c(scope, v4->qmlContextObject()); - - return !!c ? c->getContext() : 0; -} - QQmlContextData *QmlContextWrapper::getContext(const Value &value) { if (!value.isObject()) @@ -134,7 +126,7 @@ ReturnedValue QmlContextWrapper::get(const Managed *m, String *name, bool *hasPr if (resource->d()->isNullWrapper) return Object::get(m, name, hasProperty); - if (QV4::QmlContextWrapper::callingContext(v4) != resource->d()->context) + if (v4->callingQmlContext() != resource->d()->context) return Object::get(m, name, hasProperty); result = Object::get(m, name, &hasProp); -- cgit v1.2.3