on xenial help sign in
Remove || false;

And fix the tests

commita47644a6d97c489947402de2f28f5bd3b87a6841 authorAlbert Astals Cid <albert.astals@canonical.com> dateFri 8 Jan 2016, 14:25 (11 years ago) parentf672002
4 files changed+10−7
plugins/Dash/CardCreator.js+1−1 tests/plugins/Dash/cardcreator/1.res+3−2 tests/plugins/Dash/cardcreator/3.res+3−2 tests/plugins/Dash/cardcreator/5.res+3−2
plugins/Dash/CardCreator.js+1−1
@@ -71,7 +71,7 @@ var kArtShapeHolderCode = 'Item { \n\
7171 id: artShapeLoader; \n\
7272 objectName: "artShapeLoader"; \n\
7373 readonly property string cardArt: cardData && cardData["art"] || "%4"; \n\
74− active: cardArt != "" || false; \n\
74+ active: cardArt != ""; \n\
7575 asynchronous: root.asynchronous; \n\
7676 visible: status == Loader.Ready; \n\
7777 sourceComponent: Item { \n\
tests/plugins/Dash/cardcreator/1.res+3−2
@@ -24,7 +24,8 @@ Item {
2424 Loader {
2525 id: artShapeLoader;
2626 objectName: "artShapeLoader";
27− active: cardData && cardData["art"] || false;
27+ readonly property string cardArt: cardData && cardData["art"] || "";
28+ active: cardArt != "";
2829 asynchronous: root.asynchronous;
2930 visible: status == Loader.Ready;
3031 sourceComponent: Item {
@@ -82,7 +83,7 @@ Item {
8283 CroppedImageMinimumSourceSize {
8384 id: artImage;
8485 objectName: "artImage";
85− source: cardData && cardData["art"] || "";
86+ source: artShapeLoader.cardArt;
8687 asynchronous: root.asynchronous;
8788 width: root.width;
8889 height: width / artShape.aspect;
tests/plugins/Dash/cardcreator/3.res+3−2
@@ -24,7 +24,8 @@ Item {
2424 Loader {
2525 id: artShapeLoader;
2626 objectName: "artShapeLoader";
27− active: cardData && cardData["art"] || false;
27+ readonly property string cardArt: cardData && cardData["art"] || "";
28+ active: cardArt != "";
2829 asynchronous: root.asynchronous;
2930 visible: status == Loader.Ready;
3031 sourceComponent: Item {
@@ -82,7 +83,7 @@ Item {
8283 CroppedImageMinimumSourceSize {
8384 id: artImage;
8485 objectName: "artImage";
85− source: cardData && cardData["art"] || "";
86+ source: artShapeLoader.cardArt;
8687 asynchronous: root.asynchronous;
8788 width: root.width;
8889 height: width / artShape.aspect;
tests/plugins/Dash/cardcreator/5.res+3−2
@@ -24,7 +24,8 @@ Item {
2424 Loader {
2525 id: artShapeLoader;
2626 objectName: "artShapeLoader";
27− active: cardData && cardData["art"] || false;
27+ readonly property string cardArt: cardData && cardData["art"] || "";
28+ active: cardArt != "";
2829 asynchronous: root.asynchronous;
2930 visible: status == Loader.Ready;
3031 sourceComponent: Item {
@@ -82,7 +83,7 @@ Item {
8283 CroppedImageMinimumSourceSize {
8384 id: artImage;
8485 objectName: "artImage";
85− source: cardData && cardData["art"] || "";
86+ source: artShapeLoader.cardArt;
8687 asynchronous: root.asynchronous;
8788 width: root.width;
8889 height: width / artShape.aspect;