From 9306c05dd152511b8b938d7899a7bdf1aeb8d1c2 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 21 Nov 2013 16:41:32 +0100 Subject: Encapsulate the current context and fix it's usage Encapsulate accesses to the current context, and rework the way we push and pop this context from the context stack. Largely a cleanup, but simplifies the code in the long term Change-Id: I409e378490d0ab027be6a4c01a4031b2ea35c51d Reviewed-by: Simon Hausmann --- src/qml/qml/qqmllistwrapper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/qml/qml/qqmllistwrapper.cpp') diff --git a/src/qml/qml/qqmllistwrapper.cpp b/src/qml/qml/qqmllistwrapper.cpp index 2b3fcd8349..7b975c2cc8 100644 --- a/src/qml/qml/qqmllistwrapper.cpp +++ b/src/qml/qml/qqmllistwrapper.cpp @@ -106,7 +106,7 @@ ReturnedValue QmlListWrapper::get(Managed *m, const StringRef name, bool *hasPro QV4::ExecutionEngine *v4 = m->engine(); QmlListWrapper *w = m->as(); if (!w) - return v4->current->throwTypeError(); + return v4->currentContext()->throwTypeError(); if (name->equals(v4->id_length) && !w->object.isNull()) { quint32 count = w->property.count ? w->property.count(&w->property) : 0; @@ -127,7 +127,7 @@ ReturnedValue QmlListWrapper::getIndexed(Managed *m, uint index, bool *hasProper QV4::ExecutionEngine *e = m->engine(); QmlListWrapper *w = m->as(); if (!w) - return e->current->throwTypeError(); + return e->currentContext()->throwTypeError(); quint32 count = w->property.count ? w->property.count(&w->property) : 0; if (index < count && w->property.at) -- cgit v1.2.3