diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-06-13 08:53:34 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2013-06-13 08:55:21 +0200 |
commit | 7281cd44dcf538424acd58297801a79835f0cdfe (patch) | |
tree | 224b6795746b8679e885546f6505db1f86233e6b /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | |
parent | 4bdde1128f29a5545f52d6fc5fd33f1487625206 (diff) |
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 <lars.knoll@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index d77c775557..ca7c95ca24 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) |