aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qqmltypecompiler.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-01-31 09:26:16 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-03 14:37:58 +0100
commit24a3c947f7e1c63a2389e0680e470b9f493b3cc6 (patch)
tree64cebb7d638b3b583493404c48d07fea27022b30 /src/qml/compiler/qqmltypecompiler.cpp
parent26e18f978a4fede91e783e697d32bef472db1d00 (diff)
[new compiler] Fix signal handlers that are fuzzily matched
Use the same logic at object creation time as during the signal handler conversion phase. Change-Id: Idb48a3849da7b6543ec50c15e1ccbf2939c3ee39 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qqmltypecompiler.cpp')
-rw-r--r--src/qml/compiler/qqmltypecompiler.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp
index ca08c36904..d160a53821 100644
--- a/src/qml/compiler/qqmltypecompiler.cpp
+++ b/src/qml/compiler/qqmltypecompiler.cpp
@@ -1252,6 +1252,11 @@ bool QQmlPropertyValidator::validateObject(int objectIndex, const QV4::CompiledD
continue;
}
+ // Signal handlers were resolved and checked earlier in the signal handler conversion pass.
+ if (binding->flags & QV4::CompiledData::Binding::IsSignalHandlerExpression
+ || binding->flags & QV4::CompiledData::Binding::IsSignalHandlerObject)
+ continue;
+
QString name = stringAt(binding->propertyNameIndex);
bool bindingToDefaultProperty = false;
@@ -1287,8 +1292,6 @@ bool QQmlPropertyValidator::validateObject(int objectIndex, const QV4::CompiledD
&& !pd->isQList()
&& binding->type != QV4::CompiledData::Binding::Type_GroupProperty
&& !(binding->flags & QV4::CompiledData::Binding::InitializerForReadOnlyDeclaration)
- && !(binding->flags & QV4::CompiledData::Binding::IsSignalHandlerExpression)
- && !(binding->flags & QV4::CompiledData::Binding::IsSignalHandlerObject)
) {
recordError(binding->valueLocation, tr("Invalid property assignment: \"%1\" is a read-only property").arg(name));
return false;