aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compileddata_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-09-13 15:03:51 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 14:26:18 +0200
commitb4b4a646800fabbb31b4b261ea4b802d78d6501f (patch)
tree285d3553373500e4cf9b882275604002c93870ba /src/qml/compiler/qv4compileddata_p.h
parent4a59984e0d024b88a1b556870b6c183816bb1d22 (diff)
[new compiler] Initial implementation of signal handler support
Signal handlers start out in the parser as binding expressions. A new SignalHandlerConverter converts the bindings then so that the expression is turned into a function declaration where the function parameters match the parameters of the signal. Change-Id: I3ea5aa3b80a6ee3b095c6841c63c3e3bb0b47e4f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r--src/qml/compiler/qv4compileddata_p.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h
index e8d2a73278..0a404a454f 100644
--- a/src/qml/compiler/qv4compileddata_p.h
+++ b/src/qml/compiler/qv4compileddata_p.h
@@ -254,7 +254,12 @@ struct Binding
Type_Object
};
- quint32 type;
+ enum Flags {
+ IsSignalHandlerExpression = 0x1
+ };
+
+ quint32 flags : 16;
+ quint32 type : 16;
union {
bool b;
double d;
@@ -263,6 +268,8 @@ struct Binding
} value;
quint32 stringIndex; // Set for Type_String and Type_Script (the latter because of script strings)
+ Location location;
+
QString valueAsString(const Unit *unit) const;
double valueAsNumber() const
{