aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4script_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-09-13 13:43:15 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 14:26:12 +0200
commit7def3cfb31603b47a1b4e5690f8c650768f9b803 (patch)
treeb7aa966470f960fed20a366cf7c77a0357082eb5 /src/qml/jsruntime/qv4script_p.h
parent5c4c9123917fb411598807cd9bb855b9aa1fa832 (diff)
[new compiler] Fix function and binding expression setup
Binding expressions and QML used to be set up so that they were written as function closure: (function(...) { expression here }) and then evaluated inside qml scope. With the new setup we do that closure setup manually now. For that we have to define a dummy outter "context scope" function in the codegen, that will later be used to look up the context ids. Change-Id: I0656419d67a1728451fcd46f402b03979f118b0b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4script_p.h')
-rw-r--r--src/qml/jsruntime/qv4script_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4script_p.h b/src/qml/jsruntime/qv4script_p.h
index 5a880fee88..752cb2ac53 100644
--- a/src/qml/jsruntime/qv4script_p.h
+++ b/src/qml/jsruntime/qv4script_p.h
@@ -55,10 +55,14 @@ struct QmlBindingWrapper : FunctionObject {
Q_MANAGED
QmlBindingWrapper(ExecutionContext *scope, Function *f, Object *qml);
+ // Constructor for QML functions and signal handlers, resulting binding wrapper is not callable!
+ QmlBindingWrapper(ExecutionContext *scope, Object *qml);
static ReturnedValue call(Managed *that, CallData *);
static void markObjects(Managed *m);
+ CallContext *context() const { return qmlContext; }
+
private:
Object *qml;
CallContext *qmlContext;