diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-01-09 16:25:03 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-14 17:21:08 +0100 |
commit | 5df2dc3b4487da01fbd1e3cf06771f3d5b251d62 (patch) | |
tree | e23de801fa13a6f9d8fed2183fc1eb16d5db474e /src/qml | |
parent | 1512b17f8b12f6a898143913cf0bc59f9c361db9 (diff) |
[new compiler] Fix error handling for property names that look like signals
The check for the right hand side of a potential signal handler declaration
needs be placed after we determined that we are really assigning to a
signal.
Change-Id: I7f5417dc30ba7365327560e1b16ee9ceaa9bed76
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/compiler/qqmlcodegenerator.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/compiler/qqmlcodegenerator.cpp b/src/qml/compiler/qqmlcodegenerator.cpp index f0dfc9b7ea..d1504b5baa 100644 --- a/src/qml/compiler/qqmlcodegenerator.cpp +++ b/src/qml/compiler/qqmlcodegenerator.cpp @@ -1664,10 +1664,6 @@ bool SignalHandlerConverter::convertSignalHandlerExpressionsToFunctionDeclaratio if (!QQmlCodeGenerator::isSignalPropertyName(propertyName)) continue; - if (binding->type != QV4::CompiledData::Binding::Type_Script) { - COMPILE_EXCEPTION(binding->location, tr("Incorrectly specified signal assignment")); - } - PropertyResolver resolver(propertyCache); Q_ASSERT(propertyName.startsWith(QStringLiteral("on"))); @@ -1736,6 +1732,10 @@ bool SignalHandlerConverter::convertSignalHandlerExpressionsToFunctionDeclaratio parameters = entry.value(); } + if (binding->type != QV4::CompiledData::Binding::Type_Script) { + COMPILE_EXCEPTION(binding->location, tr("Incorrectly specified signal assignment")); + } + QQmlJS::Engine &jsEngine = parsedQML->jsParserEngine; QQmlJS::MemoryPool *pool = jsEngine.pool(); |