on xenial help sign in
fix tests
commit45d87c3bfe4e1742ade0591126be35ebc4b184cd authorAlbert Astals <albert.astals@canonical.com> dateWed 2 Apr 2014, 15:29 (13 years ago) parenta6bf43e
3 files changed+6−6
qml/Dash/CardHeader.qml+4−4 tests/qmltests/Dash/tst_Card.qml+1−1 tests/qmltests/Dash/tst_CardHeader.qml+1−1
qml/Dash/CardHeader.qml+4−4
@@ -19,7 +19,7 @@ import Ubuntu.Components 0.1
1919
2020Item {
2121 id: root
22− property var mascot
22+ property url mascot: ""
2323 property alias title: titleLabel.text
2424 property var subtitle
2525
@@ -35,7 +35,7 @@ Item {
3535 property bool useMascotShape: true
3636 property color fontColor: Theme.palette.selected.backgroundText
3737
38− visible: mascot || title
38+ visible: mascot != "" || title
3939 implicitHeight: row.height > 0 ? row.height + row.margins * 2 : 0
4040
4141 Row {
@@ -71,8 +71,8 @@ Item {
7171
7272 Loader {
7373 id: mascotImageLoader
74− active: root.mascot
75− visible: root.mascot && !useMascotShape && item.status === Image.Ready
74+ active: root.mascot != ""
75+ visible: active && !useMascotShape && item.status === Image.Ready
7676 anchors.verticalCenter: parent.verticalCenter
7777 sourceComponent: Image {
7878 objectName: "mascotImage"
tests/qmltests/Dash/tst_Card.qml+1−1
@@ -207,7 +207,7 @@ Rectangle {
207207
208208 function test_header_binding_data() {
209209 return [
210− { tag: "Mascot", property: "mascot", value: "../../tests/qmltests/Dash/artwork/avatar.png", index: 0 },
210+ { tag: "Mascot", property: "mascot", value: Qt.resolvedUrl("artwork/avatar.png"), index: 0 },
211211 { tag: "Title", property: "title", value: "foo", index: 0 },
212212 { tag: "Subtitle", property: "subtitle", value: "bar", index: 0 },
213213 ];
tests/qmltests/Dash/tst_CardHeader.qml+1−1
@@ -43,7 +43,7 @@ Rectangle {
4343
4444 when: windowShown
4545
46− property Item mascot: findChild(cardHeader, "mascotShape")
46+ property Item mascot: findChild(cardHeader, "mascotShapeLoader")
4747 property Item titleLabel: findChild(cardHeader, "titleLabel")
4848 property Item subtitleLabel: findChild(cardHeader, "subtitleLabel")
4949 property Item oldPriceLabel: findChild(cardHeader, "oldPriceLabel")