Merge lp:~aacid/unity8/recoverArtIfChanges into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Andrea Cimitan
Approved revision: 2215
Merged at revision: 2414
Proposed branch: lp:~aacid/unity8/recoverArtIfChanges
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/conciergeModeOptimization
Diff against target: 154 lines (+23/-0)
12 files modified
plugins/Dash/CardCreator.js (+1/-0)
tests/plugins/Dash/cardcreator/1.res (+1/-0)
tests/plugins/Dash/cardcreator/1.res.cardcreator (+1/-0)
tests/plugins/Dash/cardcreator/11.res (+1/-0)
tests/plugins/Dash/cardcreator/11.res.cardcreator (+1/-0)
tests/plugins/Dash/cardcreator/12.res (+1/-0)
tests/plugins/Dash/cardcreator/12.res.cardcreator (+1/-0)
tests/plugins/Dash/cardcreator/3.res (+1/-0)
tests/plugins/Dash/cardcreator/3.res.cardcreator (+1/-0)
tests/plugins/Dash/cardcreator/5.res (+1/-0)
tests/plugins/Dash/cardcreator/5.res.cardcreator (+1/-0)
tests/qmltests/Dash/tst_Card.qml (+12/-0)
To merge this branch: bzr merge lp:~aacid/unity8/recoverArtIfChanges
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Andrea Cimitan (community) Approve
Review via email: mp+289485@code.launchpad.net

This proposal supersedes a proposal from 2016-03-18.

Commit message

Change the art back to the cardData value if it changes from broken to valid image

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
Prereq

 * Did you perform an exploratory manual test run of your code change and any related functionality?
No since as far as i know there's no scope doing this

 * Did you make sure that your branch does not contain spurious tags?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2215
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/768/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/424
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial,testname=qmluitests.sh/424
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=autopilot.sh/424/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1009
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1025
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/1025
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1023
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1023/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1023
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1023/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1023
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1023/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1023
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1023/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1023
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1023/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1023
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1023/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/768/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
y
 * Did CI run pass? If not, please explain why.
unrelated
 * Did you make sure that the branch does not contain spurious tags?
y

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2215
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/821/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1068
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1084
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/1084
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1082
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1082/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1082/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1082
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1082/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1082/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1082
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1082/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1082/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/821/rebuild

review: Needs Fixing (continuous-integration)
lp:~aacid/unity8/recoverArtIfChanges updated
2216. By Albert Astals Cid

Merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Dash/CardCreator.js'
2--- plugins/Dash/CardCreator.js 2016-05-09 08:55:51 +0000
3+++ plugins/Dash/CardCreator.js 2016-05-09 08:55:51 +0000
4@@ -92,6 +92,7 @@
5 id: artShapeLoader; \n\
6 objectName: "artShapeLoader"; \n\
7 readonly property string cardArt: cardData && cardData["art"] || %9; \n\
8+ onCardArtChanged: { if (item) { item.image.source = cardArt; } } \n\
9 active: cardArt != ""; \n\
10 asynchronous: %6; \n\
11 visible: status == Loader.Ready; \n\
12
13=== modified file 'tests/plugins/Dash/cardcreator/1.res'
14--- tests/plugins/Dash/cardcreator/1.res 2016-05-09 08:55:51 +0000
15+++ tests/plugins/Dash/cardcreator/1.res 2016-05-09 08:55:51 +0000
16@@ -21,6 +21,7 @@
17 id: artShapeLoader;
18 objectName: "artShapeLoader";
19 readonly property string cardArt: cardData && cardData["art"] || "";
20+ onCardArtChanged: { if (item) { item.image.source = cardArt; } }
21 active: cardArt != "";
22 asynchronous: true;
23 visible: status == Loader.Ready;
24
25=== modified file 'tests/plugins/Dash/cardcreator/1.res.cardcreator'
26--- tests/plugins/Dash/cardcreator/1.res.cardcreator 2016-05-09 08:55:51 +0000
27+++ tests/plugins/Dash/cardcreator/1.res.cardcreator 2016-05-09 08:55:51 +0000
28@@ -20,6 +20,7 @@
29 id: artShapeLoader;
30 objectName: "artShapeLoader";
31 readonly property string cardArt: cardData && cardData["art"] || "";
32+ onCardArtChanged: { if (item) { item.image.source = cardArt; } }
33 active: cardArt != "";
34 asynchronous: false;
35 visible: status == Loader.Ready;
36
37=== modified file 'tests/plugins/Dash/cardcreator/11.res'
38--- tests/plugins/Dash/cardcreator/11.res 2016-05-09 08:55:51 +0000
39+++ tests/plugins/Dash/cardcreator/11.res 2016-05-09 08:55:51 +0000
40@@ -59,6 +59,7 @@
41 id: artShapeLoader;
42 objectName: "artShapeLoader";
43 readonly property string cardArt: cardData && cardData["art"] || decodeURI("%5C");
44+ onCardArtChanged: { if (item) { item.image.source = cardArt; } }
45 active: cardArt != "";
46 asynchronous: true;
47 visible: status == Loader.Ready;
48
49=== modified file 'tests/plugins/Dash/cardcreator/11.res.cardcreator'
50--- tests/plugins/Dash/cardcreator/11.res.cardcreator 2016-05-09 08:55:51 +0000
51+++ tests/plugins/Dash/cardcreator/11.res.cardcreator 2016-05-09 08:55:51 +0000
52@@ -58,6 +58,7 @@
53 id: artShapeLoader;
54 objectName: "artShapeLoader";
55 readonly property string cardArt: cardData && cardData["art"] || "";
56+ onCardArtChanged: { if (item) { item.image.source = cardArt; } }
57 active: cardArt != "";
58 asynchronous: false;
59 visible: status == Loader.Ready;
60
61=== modified file 'tests/plugins/Dash/cardcreator/12.res'
62--- tests/plugins/Dash/cardcreator/12.res 2016-05-09 08:55:51 +0000
63+++ tests/plugins/Dash/cardcreator/12.res 2016-05-09 08:55:51 +0000
64@@ -21,6 +21,7 @@
65 id: artShapeLoader;
66 objectName: "artShapeLoader";
67 readonly property string cardArt: cardData && cardData["art"] || "";
68+ onCardArtChanged: { if (item) { item.image.source = cardArt; } }
69 active: cardArt != "";
70 asynchronous: true;
71 visible: status == Loader.Ready;
72
73=== modified file 'tests/plugins/Dash/cardcreator/12.res.cardcreator'
74--- tests/plugins/Dash/cardcreator/12.res.cardcreator 2016-05-09 08:55:51 +0000
75+++ tests/plugins/Dash/cardcreator/12.res.cardcreator 2016-05-09 08:55:51 +0000
76@@ -20,6 +20,7 @@
77 id: artShapeLoader;
78 objectName: "artShapeLoader";
79 readonly property string cardArt: cardData && cardData["art"] || "";
80+ onCardArtChanged: { if (item) { item.image.source = cardArt; } }
81 active: cardArt != "";
82 asynchronous: false;
83 visible: status == Loader.Ready;
84
85=== modified file 'tests/plugins/Dash/cardcreator/3.res'
86--- tests/plugins/Dash/cardcreator/3.res 2016-05-09 08:55:51 +0000
87+++ tests/plugins/Dash/cardcreator/3.res 2016-05-09 08:55:51 +0000
88@@ -21,6 +21,7 @@
89 id: artShapeLoader;
90 objectName: "artShapeLoader";
91 readonly property string cardArt: cardData && cardData["art"] || decodeURI("IHAVE%5C%22ESCAPED%5C%22QUOTES%5C%22");
92+ onCardArtChanged: { if (item) { item.image.source = cardArt; } }
93 active: cardArt != "";
94 asynchronous: true;
95 visible: status == Loader.Ready;
96
97=== modified file 'tests/plugins/Dash/cardcreator/3.res.cardcreator'
98--- tests/plugins/Dash/cardcreator/3.res.cardcreator 2016-05-09 08:55:51 +0000
99+++ tests/plugins/Dash/cardcreator/3.res.cardcreator 2016-05-09 08:55:51 +0000
100@@ -20,6 +20,7 @@
101 id: artShapeLoader;
102 objectName: "artShapeLoader";
103 readonly property string cardArt: cardData && cardData["art"] || "";
104+ onCardArtChanged: { if (item) { item.image.source = cardArt; } }
105 active: cardArt != "";
106 asynchronous: false;
107 visible: status == Loader.Ready;
108
109=== modified file 'tests/plugins/Dash/cardcreator/5.res'
110--- tests/plugins/Dash/cardcreator/5.res 2016-05-09 08:55:51 +0000
111+++ tests/plugins/Dash/cardcreator/5.res 2016-05-09 08:55:51 +0000
112@@ -21,6 +21,7 @@
113 id: artShapeLoader;
114 objectName: "artShapeLoader";
115 readonly property string cardArt: cardData && cardData["art"] || "";
116+ onCardArtChanged: { if (item) { item.image.source = cardArt; } }
117 active: cardArt != "";
118 asynchronous: true;
119 visible: status == Loader.Ready;
120
121=== modified file 'tests/plugins/Dash/cardcreator/5.res.cardcreator'
122--- tests/plugins/Dash/cardcreator/5.res.cardcreator 2016-05-09 08:55:51 +0000
123+++ tests/plugins/Dash/cardcreator/5.res.cardcreator 2016-05-09 08:55:51 +0000
124@@ -20,6 +20,7 @@
125 id: artShapeLoader;
126 objectName: "artShapeLoader";
127 readonly property string cardArt: cardData && cardData["art"] || "";
128+ onCardArtChanged: { if (item) { item.image.source = cardArt; } }
129 active: cardArt != "";
130 asynchronous: false;
131 visible: status == Loader.Ready;
132
133=== modified file 'tests/qmltests/Dash/tst_Card.qml'
134--- tests/qmltests/Dash/tst_Card.qml 2016-05-04 14:09:00 +0000
135+++ tests/qmltests/Dash/tst_Card.qml 2016-05-09 08:55:51 +0000
136@@ -496,6 +496,18 @@
137 tryCompare(art, "visible", true);
138 compare(artImage.source, Qt.resolvedUrl("artwork/checkers.png"));
139
140+ card.cardData["art"] = "somethingbroken";
141+ card.cardDataChanged();
142+ waitForRendering(card);
143+ tryCompare(art, "visible", true);
144+ compare(artImage.source, Qt.resolvedUrl("artwork/checkers.png"));
145+
146+ card.cardData["art"] = Qt.resolvedUrl("artwork/music-player-design.png");
147+ card.cardDataChanged();
148+ waitForRendering(card);
149+ tryCompare(art, "visible", true);
150+ compare(artImage.source, Qt.resolvedUrl("artwork/music-player-design.png"));
151+
152 card.cardData["mascot"] = "somethingbroken2";
153 card.cardDataChanged();
154 compare(mascotImage.status, Image.Error);

Subscribers

People subscribed via source and target branches