From: Simon Hausmann Date: Thu, 13 Jun 2013 06:53:34 +0000 (+0200) Subject: Fix tst_qqmlecmascript::callQtInvokables X-Git-Tag: upstream/5.2.1~669^2~243 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7281cd44dcf538424acd58297801a79835f0cdfe;p=platform%2Fupstream%2Fqtdeclarative.git Fix tst_qqmlecmascript::callQtInvokables Make sure to set inheritContext to true, to run the sample scripts the same way as we run QML right now: with lookups disabled. Lookups with custom get() don't work right now and cause the tests to fail lookup properties in QObject. Change-Id: I22a1133d5d568935c64fc5162445a438665713b8 Reviewed-by: Lars Knoll --- diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index d77c775..ca7c95c 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -2171,6 +2171,7 @@ static inline bool evaluate_error(QV8Engine *engine, const QV4::Value &o, const QLatin1String(source) + QLatin1String(" })"); QV4::Script program(QV8Engine::getV4(engine)->rootContext, functionSource); + program.inheritContext = true; QV4::ExecutionContext *ctx = QV8Engine::getV4(engine)->current; @@ -2194,6 +2195,7 @@ static inline bool evaluate_value(QV8Engine *engine, const QV4::Value &o, QLatin1String(source) + QLatin1String(" })"); QV4::Script program(QV8Engine::getV4(engine)->rootContext, functionSource); + program.inheritContext = true; QV4::ExecutionContext *ctx = QV8Engine::getV4(engine)->current; try { @@ -2217,6 +2219,7 @@ static inline QV4::Value evaluate(QV8Engine *engine, const QV4::Value & o, QV4::ExecutionContext *ctx = QV8Engine::getV4(engine)->current; QV4::Script program(QV8Engine::getV4(engine)->rootContext, functionSource); + program.inheritContext = true; try { QV4::FunctionObject *function = program.run().asFunctionObject(); if (!function)