on xenial help sign in
s/avatar/mascot/
6bd97f8Michał Sawicz
Dash/CardHeader.qml+6−6
@@ -3,14 +3,14 @@ import Ubuntu.Components 0.1
3
3
4Item {
4Item {
5 id: root
5 id: root
6− property alias mascot: avatarImage.source
6+ property alias mascot: mascotImage.source
7 property alias title: titleLabel.text
7 property alias title: titleLabel.text
8 property alias subtitle: subtitleLabel.text
8 property alias subtitle: subtitleLabel.text
9 property alias price: priceLabel.text
9 property alias price: priceLabel.text
10 property alias oldPrice: oldPriceLabel.text
10 property alias oldPrice: oldPriceLabel.text
11 property alias altPrice: altPriceLabel.text
11 property alias altPrice: altPriceLabel.text
12
12
13− visible: avatarImage.status === Image.Ready || title || price
13+ visible: mascotImage.status === Image.Ready || title || price
14 height: row.height > 0 ? row.height + row.spacing * 2 : 0
14 height: row.height > 0 ? row.height + row.spacing * 2 : 0
15
15
16 Row {
16 Row {
@@ -20,16 +20,16 @@ Item {
20 spacing: units.gu(1)
20 spacing: units.gu(1)
21
21
22 UbuntuShape {
22 UbuntuShape {
23− id: avatarShape
23+ id: mascotShape
24− objectName: "avatarShape"
24+ objectName: "mascotShape"
25
25
26 width: units.gu(8)
26 width: units.gu(8)
27 height: units.gu(8)
27 height: units.gu(8)
28 visible: image.status === Image.Ready
28 visible: image.status === Image.Ready
29
29
30 image: Image {
30 image: Image {
31− id: avatarImage
31+ id: mascotImage
32− sourceSize { width: avatarShape.width; height: avatarShape.height }
32+ sourceSize { width: mascotShape.width; height: mascotShape.height }
33 }
33 }
34 }
34 }
35
35
tests/qmltests/Dash/tst_CardHeader.qml+5−5
@@ -26,14 +26,14 @@ Rectangle {
26
26
27 when: windowShown
27 when: windowShown
28
28
29− property Item avatar: findChild(cardHeader, "avatarShape")
29+ property Item mascot: findChild(cardHeader, "mascotShape")
30 property Item titleLabel: findChild(cardHeader, "titleLabel")
30 property Item titleLabel: findChild(cardHeader, "titleLabel")
31 property Item subtitleLabel: findChild(cardHeader, "subtitleLabel")
31 property Item subtitleLabel: findChild(cardHeader, "subtitleLabel")
32 property Item prices: findChild(cardHeader, "prices")
32 property Item prices: findChild(cardHeader, "prices")
33 property Item oldPriceLabel: findChild(cardHeader, "oldPriceLabel")
33 property Item oldPriceLabel: findChild(cardHeader, "oldPriceLabel")
34
34
35 function initTestCase() {
35 function initTestCase() {
36− verify(testCase.avatar !== undefined, "Couldn't find avatar object.");
36+ verify(testCase.mascot !== undefined, "Couldn't find mascot object.");
37 verify(testCase.titleLabel !== undefined, "Couldn't find titleLabel object.");
37 verify(testCase.titleLabel !== undefined, "Couldn't find titleLabel object.");
38 verify(testCase.subtitleLabel !== undefined, "Couldn't find subtitleLabel object.");
38 verify(testCase.subtitleLabel !== undefined, "Couldn't find subtitleLabel object.");
39 verify(testCase.prices !== undefined, "Couldn't find prices object.");
39 verify(testCase.prices !== undefined, "Couldn't find prices object.");
@@ -49,7 +49,7 @@ Rectangle {
49 cardHeader.altPrice = "";
49 cardHeader.altPrice = "";
50 }
50 }
51
51
52− function test_avatar_data() {
52+ function test_mascot_data() {
53 return [
53 return [
54 { tag: "Empty", source: "", visible: false },
54 { tag: "Empty", source: "", visible: false },
55 { tag: "Invalid", source: "bad_path", visible: false },
55 { tag: "Invalid", source: "bad_path", visible: false },
@@ -57,9 +57,9 @@ Rectangle {
57 ]
57 ]
58 }
58 }
59
59
60− function test_avatar(data) {
60+ function test_mascot(data) {
61 cardHeader.mascot = data.source;
61 cardHeader.mascot = data.source;
62− tryCompare(testCase.avatar, "visible", data.visible);
62+ tryCompare(testCase.mascot, "visible", data.visible);
63 }
63 }
64
64
65 function test_labels_data() {
65 function test_labels_data() {