diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-04-26 11:05:41 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-30 01:52:57 +0200 |
commit | 0e8af75e877d46cb656d03cf575804f2c17ec33f (patch) | |
tree | 6b3466202d1a62b7c5d7fb5aff904599ee8d3ca5 /tests/auto/qml/qqmlvaluetypes/data | |
parent | 1b48bb5602bd90dc78e1ff09207f682f6a43edd2 (diff) |
Ensure external value types are initialized before write
Ensure that the logic used when writing to a property having a value
type provided by an external module matches that used for properties
of internal value types.
Change-Id: I925b8b30a211ef813e2a51134411a162b0b146b5
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'tests/auto/qml/qqmlvaluetypes/data')
-rw-r--r-- | tests/auto/qml/qqmlvaluetypes/data/initializeByWrite.qml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlvaluetypes/data/initializeByWrite.qml b/tests/auto/qml/qqmlvaluetypes/data/initializeByWrite.qml new file mode 100644 index 0000000000..8493dd4d7e --- /dev/null +++ b/tests/auto/qml/qqmlvaluetypes/data/initializeByWrite.qml @@ -0,0 +1,27 @@ +import QtQuick 2.0 + +ListView { + property bool test: false + + width: 200 + height: 200 + model: 20 + + delegate: Text { + text: qsTr(props.titleText).arg(index) + color: props.titleColor + font.pointSize: props.titlePointSize + } + + property QtObject props: QtObject { + property string titleText: "List Item %1 Title" + property color titleColor: Qt.rgba(1, 0, 0, 0) + property int titlePointSize: 18 + } + + Component.onCompleted: { + test = (props.titleText == "List Item %1 Title") && + (props.titleColor == Qt.rgba(1, 0, 0, 0)) && + (props.titlePointSize == 18) + } +} |