aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlboundsignal_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-07-25 11:40:18 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-07-31 17:08:19 +0000
commita05d1796b88e628655afdba6063a186d3a0803bf (patch)
treef264bc7c52c1f1d62563ac3cb6444fecc537a4d7 /src/qml/qml/qqmlboundsignal_p.h
parentc8f118d3a4ba53761d3dbc6e08b3454a2dae0a0a (diff)
Simplify signal handler parameter handling
Unify the two QQmlBoundSignalExpression constructors and always call updateInternalClass on the run-time function to set up the parameter name -> argument mapping. This streamlines the code, shares the error handling for unnamed parameter clashes and allows getting rid of the code to extend the formals of functions that become signal handlers in AOT generated cache files. Either onThatSignal: function(param1, param2) { ... } syntax is used and the mapping is fixed and known at AOT/compile time. Or alternatively the dynamic variant is used where the formals are determined at signal handler installation time. Saves a whopping KB of RAM on the QQC1 gallery. Change-Id: I33a9afc06474143d7893f42366cb6553a07ce937 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlboundsignal_p.h')
-rw-r--r--src/qml/qml/qqmlboundsignal_p.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlboundsignal_p.h b/src/qml/qml/qqmlboundsignal_p.h
index 01094a11f7..d1ec67210e 100644
--- a/src/qml/qml/qqmlboundsignal_p.h
+++ b/src/qml/qml/qqmlboundsignal_p.h
@@ -73,10 +73,8 @@ public:
const QString &parameterString = QString());
QQmlBoundSignalExpression(QObject *target, int index,
- QQmlContextData *ctxt, QObject *scopeObject, QV4::Function *function, QV4::ExecutionContext *scope);
-
- QQmlBoundSignalExpression(QObject *target, int index,
- QQmlContextData *ctxt, QObject *scope, QV4::Function *runtimeFunction);
+ QQmlContextData *ctxt, QObject *scopeObject, QV4::Function *function,
+ QV4::ExecutionContext *scope = nullptr);
// inherited from QQmlJavaScriptExpression.
QString expressionIdentifier() const override;