Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Chris Adams
authored and
Qt by Nokia
committed
Dec 19, 2011
1 parent
6859056
commit 8460eae
Showing
3 changed files
with
101 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
tests/auto/declarative/qdeclarativeecmascript/data/assignSequenceTypes.7.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" ]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters