diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-06-19 14:18:13 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-08-10 01:21:57 +0000 |
commit | b2889568170b20ca8f870a7f4a1a1c3ac9f698c5 (patch) | |
tree | f29aace79649f0f328a84e4aa91b71d49390317b /src/qml/jsruntime/qv4engine.cpp | |
parent | 18557c26761581e10182d8c019ba3f5a6f81bb1c (diff) |
Use the QmlContext to access properties of the scope object
Add some runtime methods to access properties of the scope
object directly (using the QmlContext), and generate proper
code to call those.
Change-Id: I0b29357c9a3b9ad53ba568ec6cb763e8ecb10f21
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index a55755c6d1..4f22f9063c 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -743,6 +743,8 @@ Heap::QmlContext *ExecutionEngine::qmlContext() const Heap::QmlContextWrapper *ExecutionEngine::qmlContextObject() const { Heap::QmlContext *ctx = qmlContext(); + if (!ctx) + return 0; Q_ASSERT(ctx->qml); return ctx->qml; } |