diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-08-12 15:08:54 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-08-20 20:01:29 +0000 |
commit | 88cc9b233435f5e9085faefa6e671f1c5e4d2b95 (patch) | |
tree | f9b076329c74d8a1099e3a4cd35f262a46c6663d /tests | |
parent | ad55f5fd249296de8871545f6d4cf463bd5ed1c9 (diff) |
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 <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<QV4::QmlContextWrapper> 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); } } |