diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2019-10-01 14:26:44 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2019-10-21 14:38:32 +0200 |
commit | 1eed1b860534f481b89b411fc7e21a7daa22d5ee (patch) | |
tree | f5f0d2291c1dbbb4c5fd4a897fd08956c438075b /tests/auto/qml/qqmlproperty/data | |
parent | 488a37c861a1724a935a8d7b925693a38918a71a (diff) |
Fix interface handling in bindings
If a type had a property with an interface type, we did not support the
case where the assigned binding value is convertible to the interface.
This is now fixed by adding a last new check to QQmlPrivate::write
Fixes: QTBUG-78721
Change-Id: I0b85fbfdf8561ba43610ac343001ae380287a674
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlproperty/data')
-rw-r--r-- | tests/auto/qml/qqmlproperty/data/interfaceBinding.qml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlproperty/data/interfaceBinding.qml b/tests/auto/qml/qqmlproperty/data/interfaceBinding.qml new file mode 100644 index 0000000000..4e72a75f42 --- /dev/null +++ b/tests/auto/qml/qqmlproperty/data/interfaceBinding.qml @@ -0,0 +1,27 @@ +import QtQuick 2.12 +import io.qt.bugreports 1.0 +Item { + InterfaceConsumer { + objectName: "a1" + i: A { + property int i: 42 + } + } + + InterfaceConsumer { + objectName: "a2" + property A a: A { + property int i: 43 + } + i: a + } + + InterfaceConsumer { + objectName: "a3" + property A a: A { + id : aa + property int i: 44 + } + i: aa + } +} |