diff options
author | Chris Adams <christopher.adams@nokia.com> | 2011-12-15 12:01:39 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-19 01:13:53 +0100 |
commit | 8460eae44c241d5975b3041eedf6e08c9638fd41 (patch) | |
tree | 0e342e789966b86b2d320ecccee22477192ccfc0 /tests/auto/declarative/qdeclarativeecmascript/data | |
parent | 6859056a0924b3da52b045aa14a34fae59a5c75e (diff) |
Correctly resolve elements of QList<QUrl> properties
Previously, the value of a QList<QUrl> sequence was only resolved if
there was only one element in the sequence. This commit ensures that
all elements in the sequence are resolved correctly.
Task-number: QTBUG-23131
Change-Id: Id27748853fe01ae22800fbd02d062e268ad7ec70
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/data')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.7.qml | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.7.qml b/tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.7.qml new file mode 100644 index 0000000000..96c0684939 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.7.qml @@ -0,0 +1,42 @@ +import QtQuick 2.0 +import Qt.test 1.0 + +Item { + // single url assignment to url list property + MySequenceConversionObject { + id: msco1 + objectName: "msco1" + } + + // single url binding to url list property + MySequenceConversionObject { + id: msco2 + objectName: "msco2" + urlListProperty: "example.html" + } + + // multiple url assignment to url list property + MySequenceConversionObject { + id: msco3 + objectName: "msco3" + } + + // multiple url binding to url list property + MySequenceConversionObject { + id: msco4 + objectName: "msco4" + urlListProperty: [ "example.html", "example2.html" ] + } + + // multiple url binding to url list property - already resolved + MySequenceConversionObject { + id: msco5 + objectName: "msco5" + urlListProperty: [ Qt.resolvedUrl("example.html"), Qt.resolvedUrl("example2.html") ] + } + + Component.onCompleted: { + msco1.urlListProperty = "example.html"; + msco3.urlListProperty = [ "example.html", "example2.html" ]; + } +} |