From 88cc9b233435f5e9085faefa6e671f1c5e4d2b95 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 12 Aug 2015 15:08:54 +0200 Subject: Cleanup qmlcontextwrapper usage in XHR Get rid of the static getContext overload and simplify the signature of the dispatchCallback method in XHR. Get rid of the m_me object, and instead store a pointer to the thisObject and the context data directly. Turn all internal errors into assertions. Change-Id: I5427b2009c64f54b67cce1c130eace47201624bd Reviewed-by: Simon Hausmann --- tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 133fadb69a..222e594d1a 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -3941,12 +3941,12 @@ void tst_qqmlecmascript::verifyContextLifetime(QQmlContextData *ctxt) { QV4::ExecutionEngine *v4 = QV8Engine::getV4(engine); QV4::Scope scope(v4); QV4::ScopedArrayObject scripts(scope, ctxt->importedScripts.value()); - QV4::ScopedValue qml(scope); + QV4::Scoped qml(scope); for (quint32 i = 0; i < scripts->getLength(); ++i) { QQmlContextData *scriptContext, *newContext; qml = scripts->getIndexed(i); - scriptContext = QV4::QmlContextWrapper::getContext(qml); + scriptContext = qml ? qml->getContext() : 0; qml = QV4::Encode::undefined(); { @@ -3957,7 +3957,7 @@ void tst_qqmlecmascript::verifyContextLifetime(QQmlContextData *ctxt) { ctxt->engine->collectGarbage(); qml = scripts->getIndexed(i); - newContext = QV4::QmlContextWrapper::getContext(qml); + newContext = qml ? qml->getContext() : 0; QCOMPARE(scriptContext, newContext); } } -- cgit v1.2.3