on xenial help sign in
adapt card creator tests yet again
ac91d94Albert Astals
tests/plugins/Dash/cardcreator/1.res+2−2
@@ -46,8 +46,8 @@ Item {
46 }
46 }
47 image: Image {
47 image: Image {
48 objectName: "artImage";
48 objectName: "artImage";
49− property bool everShown: false;
49+ property bool doLoadSource: !NetworkingStatus.limitedBandwith;
50− source: { if (root.visible) everShown = true; return everShown && cardData && cardData["art"] || ""; }
50+ source: { if (root.visible) doLoadSource = true; return doLoadSource && cardData && cardData["art"] || ""; }
51 cache: true;
51 cache: true;
52 asynchronous: root.asynchronous;
52 asynchronous: root.asynchronous;
53 fillMode: Image.PreserveAspectCrop;
53 fillMode: Image.PreserveAspectCrop;
tests/plugins/Dash/cardcreator/2.res+2−2
@@ -67,8 +67,8 @@ Image {
67 objectName: "mascotImage";
67 objectName: "mascotImage";
68 anchors { verticalCenter: parent.verticalCenter; }
68 anchors { verticalCenter: parent.verticalCenter; }
69 readonly property int maxSize: Math.max(width, height) * 4;
69 readonly property int maxSize: Math.max(width, height) * 4;
70− property bool everShown: false;
70+ property bool doLoadSource: !NetworkingStatus.limitedBandwith;
71− source: { if (root.visible) everShown = true; return everShown && cardData && cardData["mascot"] || ""; }
71+ source: { if (root.visible) doLoadSource = true; return doLoadSource && cardData && cardData["mascot"] || ""; }
72 width: units.gu(6);
72 width: units.gu(6);
73 height: units.gu(5.625);
73 height: units.gu(5.625);
74 sourceSize { width: maxSize; height: maxSize }
74 sourceSize { width: maxSize; height: maxSize }
tests/plugins/Dash/cardcreator/3.res+3−3
@@ -46,9 +46,9 @@ Item {
46 }
46 }
47 image: Image {
47 image: Image {
48 objectName: "artImage";
48 objectName: "artImage";
49− property bool everShown: false;
49+ property bool doLoadSource: !NetworkingStatus.limitedBandwith;
50− source: { if (root.visible) everShown = true; return everShown && cardData && cardData["art"] || ""; }
50+ source: { if (root.visible) doLoadSource = true; return doLoadSource && cardData && cardData["art"] || ""; }
51− cache: true;
51+ cache: true;
52 asynchronous: root.asynchronous;
52 asynchronous: root.asynchronous;
53 fillMode: Image.PreserveAspectCrop;
53 fillMode: Image.PreserveAspectCrop;
54 width: root.width;
54 width: root.width;
tests/plugins/Dash/cardcreator/4.res+3−3
@@ -46,9 +46,9 @@ Loader {
46 objectName: "mascotImage";
46 objectName: "mascotImage";
47 anchors { verticalCenter: parent.verticalCenter; }
47 anchors { verticalCenter: parent.verticalCenter; }
48 readonly property int maxSize: Math.max(width, height) * 4;
48 readonly property int maxSize: Math.max(width, height) * 4;
49− property bool everShown: false;
49+ property bool doLoadSource: !NetworkingStatus.limitedBandwith;
50− source: { if (root.visible) everShown = true; return everShown && cardData && cardData["mascot"] || ""; }
50+ source: { if (root.visible) doLoadSource = true; return doLoadSource && cardData && cardData["mascot"] || ""; }
51− width: units.gu(6);
51+ width: units.gu(6);
52 height: units.gu(5.625);
52 height: units.gu(5.625);
53 sourceSize { width: maxSize; height: maxSize }
53 sourceSize { width: maxSize; height: maxSize }
54 fillMode: Image.PreserveAspectCrop;
54 fillMode: Image.PreserveAspectCrop;
tests/plugins/Dash/cardcreator/5.res+3−3
@@ -46,9 +46,9 @@ Item {
46 }
46 }
47 image: Image {
47 image: Image {
48 objectName: "artImage";
48 objectName: "artImage";
49− property bool everShown: false;
49+ property bool doLoadSource: !NetworkingStatus.limitedBandwith;
50− source: { if (root.visible) everShown = true; return everShown && cardData && cardData["art"] || ""; }
50+ source: { if (root.visible) doLoadSource = true; return doLoadSource && cardData && cardData["art"] || ""; }
51− cache: true;
51+ cache: true;
52 asynchronous: root.asynchronous;
52 asynchronous: root.asynchronous;
53 fillMode: Image.PreserveAspectCrop;
53 fillMode: Image.PreserveAspectCrop;
54 width: root.width;
54 width: root.width;
tests/plugins/Dash/cardcreator/7.res+3−3
@@ -67,9 +67,9 @@ Image {
67 objectName: "mascotImage";
67 objectName: "mascotImage";
68 anchors { verticalCenter: parent.verticalCenter; }
68 anchors { verticalCenter: parent.verticalCenter; }
69 readonly property int maxSize: Math.max(width, height) * 4;
69 readonly property int maxSize: Math.max(width, height) * 4;
70− property bool everShown: false;
70+ property bool doLoadSource: !NetworkingStatus.limitedBandwith;
71− source: { if (root.visible) everShown = true; return everShown && cardData && cardData["mascot"] || ""; }
71+ source: { if (root.visible) doLoadSource = true; return doLoadSource && cardData && cardData["mascot"] || ""; }
72− width: units.gu(6);
72+ width: units.gu(6);
73 height: units.gu(5.625);
73 height: units.gu(5.625);
74 sourceSize { width: maxSize; height: maxSize }
74 sourceSize { width: maxSize; height: maxSize }
75 fillMode: Image.PreserveAspectCrop;
75 fillMode: Image.PreserveAspectCrop;