diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-05-21 16:11:24 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-27 07:53:24 +0200 |
commit | 228fe20d82c15b713f773b5cfc33910d3457fb63 (patch) | |
tree | 717e9f29f45498597e0c6ee6ac90fc1036b4c941 /tests/auto/qml/qqmllanguage/data | |
parent | 7a5f70d6e5037334813db938eb0f4a646df512e9 (diff) |
Fix crash (failing assertion) when declaring a non-string id property
This isn't very useful QML, but the following was "legal" in 5.1:
property int id:
id: foo
The integer property was not set, but the object's name (id) was still set.
With 5.3 this causes a failing assertion, which shouldn't happen. We should
do the same thing as the old code in QQmlComponent::buildProperty did for
id properties: Set them only if they're of string type.
Task-number: QTBUG-38463
Change-Id: I0da58557fbfb0944f53127e0ee77117ac33ce250
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/data')
-rw-r--r-- | tests/auto/qml/qqmllanguage/data/idPropertyMismatch.qml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/idPropertyMismatch.qml b/tests/auto/qml/qqmllanguage/data/idPropertyMismatch.qml new file mode 100644 index 0000000000..8c4fd65786 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/idPropertyMismatch.qml @@ -0,0 +1,5 @@ +import QtQml 2.0 +QtObject { + property int id; + id: "root" +} |