diff options
author | Liang Qi <liang.qi@qt.io> | 2018-05-11 12:56:57 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-05-11 13:29:12 +0200 |
commit | 2a98afad6eefab6039905f70df7d25537bc5774b (patch) | |
tree | 974b6863e87a0da86bad55bf9af7e424b57806e5 /src/qml/compiler/qv4compilerscanfunctions.cpp | |
parent | fb04917e8eb1f7cc5832b2f13ab1d208b0e1014f (diff) | |
parent | 2433fa45d75cf26add9e7f0ceb8ee439eba68753 (diff) | |
download | qtdeclarative-2a98afad6eefab6039905f70df7d25537bc5774b.tar.gz |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
src/qml/compiler/qv4compilerscanfunctions.cpp
tools/tools.pro
Done-with: Lars Knoll <lars.knoll@qt.io>
Change-Id: Ia77ee6ede6fc9760ce5a03d68079579a63e5a02f
Diffstat (limited to 'src/qml/compiler/qv4compilerscanfunctions.cpp')
-rw-r--r-- | src/qml/compiler/qv4compilerscanfunctions.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4compilerscanfunctions.cpp b/src/qml/compiler/qv4compilerscanfunctions.cpp index 372e240700..eeb051046b 100644 --- a/src/qml/compiler/qv4compilerscanfunctions.cpp +++ b/src/qml/compiler/qv4compilerscanfunctions.cpp @@ -587,6 +587,12 @@ void ScanFunctions::calcEscapingVariables() auto m = c->members.find(c->caughtVariable); m->canEscape = true; } + const QLatin1String exprForOn("expression for on"); + if (c->contextType == ContextType::Binding && c->name.length() > exprForOn.size() && + c->name.startsWith(exprForOn) && c->name.at(exprForOn.size()).isUpper()) + // we don't really need this for bindings, but we do for signal handlers, and in this case, + // we don't know if the code is a signal handler or not. + c->requiresExecutionContext = true; if (allVarsEscape) { for (auto &m : c->members) m.canEscape = true; |