Type: User Story
Priority: Not Evaluated
Resolution: Out of scope
Affects Version/s: None
Fix Version/s: None
Component/s: QML: Compiler
I just tried to override a readonly property in a lower level element.
i.e. the same property name (i.e. _EID) existing in a new qml file and
in the qml file named as the basis of the new qml file, as shown in
the snapshot of the debug session.
Is this suppose to be a valid situation. When (if) I tried to access the property
_EID in the qml file's logic, which value will be returned or will both values be returned?
See attached snapshot.
Sorry I forgot to say the base object is of QtObject type. This might be important
in reproducing the problem.
Found out that this situation does not depend on the "readonly" attribute.
When I open Qt Creator, and open the project, and perform "run" or "debug" no
errors are reported in the application log. The duplicate property is present.
When I edit the new qml file which invokes the lower level definition with the same
property name, a M301 error is recorded on the instance of the new qml object
pointing to the base element. If in the new qml file I comment out the duplicate
definition, all errors are resolved.
Clearly the runtime environment does not detect the error situation. It seems the
source checking code detects something. But this does not prevent the building
and running of the source code.
It seems the "compile" logic is missing some duplicate property name checking.
I understand that using a new property definition may break some binding rules.
Are there such binding rules at the QtObject level?