diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-01-27 13:09:01 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-28 10:41:52 +0100 |
commit | f9a285daf2033b5393d5b521d27c0cc659515632 (patch) | |
tree | 412c31c4a45847215aa82ed89c48526c9983a216 /src/qml/qml/qqmlcompiler.cpp | |
parent | cad0f7e5b9915b1f4579f25121f7b9231405bfa2 (diff) |
[new compiler] Report errors when trying to bind to read-only properties
The only exception are initializers for read-only property declarations.
Also adjusted the error location of one test to point to the correct value
location as opposed to the property location, as with all the other similar
errors.
Change-Id: I2333d3c485fc374b1b39a5f5a4408af5cf08a20f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcompiler.cpp')
-rw-r--r-- | src/qml/qml/qqmlcompiler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlcompiler.cpp b/src/qml/qml/qqmlcompiler.cpp index 0dd4ea015d..821ac4602d 100644 --- a/src/qml/qml/qqmlcompiler.cpp +++ b/src/qml/qml/qqmlcompiler.cpp @@ -3456,7 +3456,7 @@ bool QQmlCompiler::buildBinding(QQmlScript::Value *value, Q_ASSERT(prop->parent->metatype); if (!prop->core.isWritable() && !prop->core.isQList() && !prop->isReadOnlyDeclaration) - COMPILE_EXCEPTION(prop, tr("Invalid property assignment: \"%1\" is a read-only property").arg(prop->name().toString())); + COMPILE_EXCEPTION(value, tr("Invalid property assignment: \"%1\" is a read-only property").arg(prop->name().toString())); JSBindingReference *reference = pool->New<JSBindingReference>(); reference->expression = value->value; |