diff options
-rw-r--r-- | src/declarative/qml/qdeclarativecontext.cpp | 1 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp index b244cd880d..57ef90c707 100644 --- a/src/declarative/qml/qdeclarativecontext.cpp +++ b/src/declarative/qml/qdeclarativecontext.cpp @@ -78,6 +78,7 @@ void QDeclarativeContextPrivate::addScript(const QDeclarativeParser::Object::Scr QScriptValue scope = scriptEngine->newObject(); scriptContext->setActivationObject(scope); + scriptContext->pushScope(scope); for (int ii = 0; ii < script.codes.count(); ++ii) { scriptEngine->evaluate(script.codes.at(ii), script.files.at(ii), script.lineNumbers.at(ii)); diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 8e7944dfc6..85a3ef3033 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -1678,7 +1678,6 @@ void tst_qdeclarativeecmascript::scriptScope() MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create()); QVERIFY(object != 0); emit object->basicSignal(); - QEXPECT_FAIL("", "QTBUG-8641", Continue); QCOMPARE(object->property("result").toString(), QLatin1String("world")); delete object; |