on xenial help sign in
asynchronous is only false on the fake card in cardtool
2cd0d2aAlbert Astals Cid
plugins/Dash/CardCreator.js+29−18
@@ -18,12 +18,13 @@
18
18
19// %1 is the template["card-background"]["elements"][0]
19// %1 is the template["card-background"]["elements"][0]
20// %2 is the template["card-background"]["elements"][1]
20// %2 is the template["card-background"]["elements"][1]
21+// %3 is whether the loader should be asynchronous or not
21−// %3 is the template["card-background"] string
22+// %4 is the template["card-background"] string
22var kBackgroundLoaderCode = 'Loader {\n\
23var kBackgroundLoaderCode = 'Loader {\n\
23 id: backgroundLoader; \n\
24 id: backgroundLoader; \n\
24 objectName: "backgroundLoader"; \n\
25 objectName: "backgroundLoader"; \n\
25 anchors.fill: parent; \n\
26 anchors.fill: parent; \n\
26− asynchronous: root.asynchronous; \n\
27+ asynchronous: %3; \n\
27 visible: status == Loader.Ready; \n\
28 visible: status == Loader.Ready; \n\
28 sourceComponent: UbuntuShape { \n\
29 sourceComponent: UbuntuShape { \n\
29 objectName: "background"; \n\
30 objectName: "background"; \n\
@@ -46,7 +47,7 @@ var kBackgroundLoaderCode = 'Loader {\n\
46 objectName: "backgroundImage"; \n\
47 objectName: "backgroundImage"; \n\
47 source: { \n\
48 source: { \n\
48 if (cardData && typeof cardData["background"] === "string") return cardData["background"]; \n\
49 if (cardData && typeof cardData["background"] === "string") return cardData["background"]; \n\
49− else return %3; \n\
50+ else return %4; \n\
50 } \n\
51 } \n\
51 } \n\
52 } \n\
52 function getColor(index) { \n\
53 function getColor(index) { \n\
@@ -63,8 +64,9 @@ var kBackgroundLoaderCode = 'Loader {\n\
63// %3 is used as image height
64// %3 is used as image height
64// %4 is used for artShapeSource.hideSource and inner Loader visible
65// %4 is used for artShapeSource.hideSource and inner Loader visible
65// %5 is used as aspect ratio fallback
66// %5 is used as aspect ratio fallback
67+// %6 is whether the loader should be asynchronous or not
66−// %6 is injected as code to artImage
68+// %7 is injected as code to artImage
67−// %7 is used as image fallback
69+// %8 is used as image fallback
68var kArtShapeHolderCode = 'Item { \n\
70var kArtShapeHolderCode = 'Item { \n\
69 id: artShapeHolder; \n\
71 id: artShapeHolder; \n\
70 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; \n\
72 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; \n\
@@ -73,9 +75,9 @@ var kArtShapeHolderCode = 'Item { \n\
73 Loader { \n\
75 Loader { \n\
74 id: artShapeLoader; \n\
76 id: artShapeLoader; \n\
75 objectName: "artShapeLoader"; \n\
77 objectName: "artShapeLoader"; \n\
76− readonly property string cardArt: cardData && cardData["art"] || %7; \n\
78+ readonly property string cardArt: cardData && cardData["art"] || %8; \n\
77 active: cardArt != ""; \n\
79 active: cardArt != ""; \n\
78− asynchronous: root.asynchronous; \n\
80+ asynchronous: %6; \n\
79 visible: status == Loader.Ready; \n\
81 visible: status == Loader.Ready; \n\
80 sourceComponent: Item { \n\
82 sourceComponent: Item { \n\
81 id: artShape; \n\
83 id: artShape; \n\
@@ -132,10 +134,10 @@ var kArtShapeHolderCode = 'Item { \n\
132 id: artImage; \n\
134 id: artImage; \n\
133 objectName: "artImage"; \n\
135 objectName: "artImage"; \n\
134 source: artShapeLoader.cardArt; \n\
136 source: artShapeLoader.cardArt; \n\
135− asynchronous: root.asynchronous; \n\
137+ asynchronous: %6; \n\
136 width: %2; \n\
138 width: %2; \n\
137 height: %3; \n\
139 height: %3; \n\
138− %6 \n\
140+ %7 \n\
139 } \n\
141 } \n\
140 } \n\
142 } \n\
141 } \n\
143 } \n\
@@ -187,12 +189,13 @@ var kAudioButtonCode = 'AbstractButton { \n\
187 } \n\
189 } \n\
188 }';
190 }';
189
191
192+// %1 is whether the loader should be asynchronous or not
190var kOverlayLoaderCode = 'Loader { \n\
193var kOverlayLoaderCode = 'Loader { \n\
191 id: overlayLoader; \n\
194 id: overlayLoader; \n\
192 readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2); \n\
195 readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2); \n\
193 anchors.fill: artShapeHolder; \n\
196 anchors.fill: artShapeHolder; \n\
194 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false; \n\
197 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false; \n\
195− asynchronous: root.asynchronous; \n\
198+ asynchronous: %1; \n\
196 visible: showHeader && status == Loader.Ready; \n\
199 visible: showHeader && status == Loader.Ready; \n\
197 sourceComponent: UbuntuShapeOverlay { \n\
200 sourceComponent: UbuntuShapeOverlay { \n\
198 id: overlay; \n\
201 id: overlay; \n\
@@ -242,10 +245,11 @@ function kHeaderContainerCodeGenerator() {
242}
245}
243
246
244// %1 is used as anchors of mascotShapeLoader
247// %1 is used as anchors of mascotShapeLoader
248+// %2 is whether the loader should be asynchronous or not
245var kMascotShapeLoaderCode = 'Loader { \n\
249var kMascotShapeLoaderCode = 'Loader { \n\
246 id: mascotShapeLoader; \n\
250 id: mascotShapeLoader; \n\
247 objectName: "mascotShapeLoader"; \n\
251 objectName: "mascotShapeLoader"; \n\
248− asynchronous: root.asynchronous; \n\
252+ asynchronous: %2; \n\
249 active: mascotImage.status === Image.Ready; \n\
253 active: mascotImage.status === Image.Ready; \n\
250 visible: showHeader && active && status == Loader.Ready; \n\
254 visible: showHeader && active && status == Loader.Ready; \n\
251 width: units.gu(6); \n\
255 width: units.gu(6); \n\
@@ -414,7 +418,6 @@ function cardString(template, components, isCardTool) {
414 property int fixedHeaderHeight: -1; \n\
418 property int fixedHeaderHeight: -1; \n\
415 property size fixedArtShapeSize: Qt.size(-1, -1); \n\
419 property size fixedArtShapeSize: Qt.size(-1, -1); \n\
416 readonly property string title: cardData && cardData["title"] || ""; \n\
420 readonly property string title: cardData && cardData["title"] || ""; \n\
417− property bool asynchronous: true; \n\
418 property bool showHeader: true; \n\
421 property bool showHeader: true; \n\
419 implicitWidth: childrenRect.width; \n\
422 implicitWidth: childrenRect.width; \n\
420 enabled: %1; \n\
423 enabled: %1; \n\
@@ -435,6 +438,7 @@ function cardString(template, components, isCardTool) {
435 var hasHeaderRow = hasMascot && hasTitle;
438 var hasHeaderRow = hasMascot && hasTitle;
436 var hasAttributes = hasTitle && components["attributes"] && components["attributes"]["field"] || false;
439 var hasAttributes = hasTitle && components["attributes"] && components["attributes"]["field"] || false;
437 var isAudio = template["quick-preview-type"] === "audio";
440 var isAudio = template["quick-preview-type"] === "audio";
441+ var asynchronous = isCardTool ? "false" : "true";
438
442
439 if (isAudio) {
443 if (isAudio) {
440 // For now we only support audio cards with [optional] art, title, subtitle
444 // For now we only support audio cards with [optional] art, title, subtitle
@@ -468,7 +472,7 @@ function cardString(template, components, isCardTool) {
468 backgroundElements1 = '"%1"'.arg(element1);
472 backgroundElements1 = '"%1"'.arg(element1);
469 }
473 }
470 }
474 }
471− code += kBackgroundLoaderCode.arg(backgroundElements0).arg(backgroundElements1).arg(templateCardBackground);
475+ code += kBackgroundLoaderCode.arg(backgroundElements0).arg(backgroundElements1).arg(asynchronous).arg(templateCardBackground);
472 }
476 }
473
477
474 if (hasArt) {
478 if (hasArt) {
@@ -503,17 +507,24 @@ function cardString(template, components, isCardTool) {
503 var fallbackURICode = '""';
507 var fallbackURICode = '""';
504 if (fallback !== "") {
508 if (fallback !== "") {
505 // fallbackStatusCode has %6 in it because we want to substitute it for fallbackURICode
509 // fallbackStatusCode has %6 in it because we want to substitute it for fallbackURICode
506− // which in kArtShapeHolderCode is %7
510+ // which in kArtShapeHolderCode is %8
507− fallbackStatusCode += 'onStatusChanged: if (status === Image.Error) source = %7;';
511+ fallbackStatusCode += 'onStatusChanged: if (status === Image.Error) source = %8;';
508 fallbackURICode = 'decodeURI("%1")'.arg(fallback);
512 fallbackURICode = 'decodeURI("%1")'.arg(fallback);
509 }
513 }
510− code += kArtShapeHolderCode.arg(artAnchors).arg(widthCode).arg(heightCode).arg(isConciergeMode ? "false" : "true").arg(aspectRatio).arg(fallbackStatusCode).arg(fallbackURICode);
514+ code += kArtShapeHolderCode.arg(artAnchors)
515+ .arg(widthCode)
516+ .arg(heightCode)
517+ .arg(isConciergeMode ? "false" : "true")
518+ .arg(aspectRatio)
519+ .arg(asynchronous)
520+ .arg(fallbackStatusCode)
521+ .arg(fallbackURICode);
511 } else {
522 } else {
512 code += 'readonly property size artShapeSize: Qt.size(-1, -1);\n'
523 code += 'readonly property size artShapeSize: Qt.size(-1, -1);\n'
513 }
524 }
514
525
515 if (headerAsOverlay) {
526 if (headerAsOverlay) {
516− code += kOverlayLoaderCode;
527+ code += kOverlayLoaderCode.arg(asynchronous);
517 }
528 }
518
529
519 var headerVerticalAnchors;
530 var headerVerticalAnchors;
@@ -595,7 +606,7 @@ function cardString(template, components, isCardTool) {
595 }
606 }
596
607
597 if (useMascotShape) {
608 if (useMascotShape) {
598− mascotShapeCode = kMascotShapeLoaderCode.arg(mascotAnchors);
609+ mascotShapeCode = kMascotShapeLoaderCode.arg(mascotAnchors).arg(asynchronous);
599 }
610 }
600
611
601 var mascotImageVisible = useMascotShape ? 'false' : 'showHeader';
612 var mascotImageVisible = useMascotShape ? 'false' : 'showHeader';
qml/Dash/CardTool.qml−1
@@ -219,7 +219,6 @@ Item {
219 sourceComponent: CardCreatorCache.getCardComponent(cardTool.template, cardTool.components, true);
219 sourceComponent: CardCreatorCache.getCardComponent(cardTool.template, cardTool.components, true);
220 onLoaded: {
220 onLoaded: {
221 item.objectName = "cardToolCard";
221 item.objectName = "cardToolCard";
222− item.asynchronous = false;
223 item.width = Qt.binding(function() { return cardTool.cardWidth !== -1 ? cardTool.cardWidth : item.implicitWidth; });
222 item.width = Qt.binding(function() { return cardTool.cardWidth !== -1 ? cardTool.cardWidth : item.implicitWidth; });
224 item.height = Qt.binding(function() { return cardTool.cardHeight !== -1 ? cardTool.cardHeight : item.implicitHeight; });
223 item.height = Qt.binding(function() { return cardTool.cardHeight !== -1 ? cardTool.cardHeight : item.implicitHeight; });
225 }
224 }
tests/plugins/Dash/cardcreator/1.res+3−4
@@ -9,8 +9,7 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13− property bool showHeader: true;
12+ property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
16
15
@@ -25,7 +24,7 @@ Item {
25 objectName: "artShapeLoader";
24 objectName: "artShapeLoader";
26 readonly property string cardArt: cardData && cardData["art"] || "";
25 readonly property string cardArt: cardData && cardData["art"] || "";
27 active: cardArt != "";
26 active: cardArt != "";
28− asynchronous: root.asynchronous;
27+ asynchronous: true;
29 visible: status == Loader.Ready;
28 visible: status == Loader.Ready;
30 sourceComponent: Item {
29 sourceComponent: Item {
31 id: artShape;
30 id: artShape;
@@ -82,7 +81,7 @@ Item {
82 id: artImage;
81 id: artImage;
83 objectName: "artImage";
82 objectName: "artImage";
84 source: artShapeLoader.cardArt;
83 source: artShapeLoader.cardArt;
85− asynchronous: root.asynchronous;
84+ asynchronous: true;
86 width: root.width;
85 width: root.width;
87 height: width / artShape.aspect;
86 height: width / artShape.aspect;
88 }
87 }
tests/plugins/Dash/cardcreator/1.res.cardcreator+2−3
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
@@ -25,7 +24,7 @@ Item {
25 objectName: "artShapeLoader";
24 objectName: "artShapeLoader";
26 readonly property string cardArt: cardData && cardData["art"] || "";
25 readonly property string cardArt: cardData && cardData["art"] || "";
27 active: cardArt != "";
26 active: cardArt != "";
28− asynchronous: root.asynchronous;
27+ asynchronous: false;
29 visible: status == Loader.Ready;
28 visible: status == Loader.Ready;
30 sourceComponent: Item {
29 sourceComponent: Item {
31 id: artShape;
30 id: artShape;
@@ -82,7 +81,7 @@ Item {
82 id: artImage;
81 id: artImage;
83 objectName: "artImage";
82 objectName: "artImage";
84 source: artShapeLoader.cardArt;
83 source: artShapeLoader.cardArt;
85− asynchronous: root.asynchronous;
84+ asynchronous: false;
86 width: root.width;
85 width: root.width;
87 height: width / artShape.aspect;
86 height: width / artShape.aspect;
88 }
87 }
tests/plugins/Dash/cardcreator/10.res+1−2
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
@@ -18,7 +17,7 @@ Loader {
18 id: backgroundLoader;
17 id: backgroundLoader;
19 objectName: "backgroundLoader";
18 objectName: "backgroundLoader";
20 anchors.fill: parent;
19 anchors.fill: parent;
21− asynchronous: root.asynchronous;
20+ asynchronous: true;
22 visible: status == Loader.Ready;
21 visible: status == Loader.Ready;
23 sourceComponent: UbuntuShape {
22 sourceComponent: UbuntuShape {
24 objectName: "background";
23 objectName: "background";
tests/plugins/Dash/cardcreator/10.res.cardcreator+1−2
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
@@ -18,7 +17,7 @@ Loader {
18 id: backgroundLoader;
17 id: backgroundLoader;
19 objectName: "backgroundLoader";
18 objectName: "backgroundLoader";
20 anchors.fill: parent;
19 anchors.fill: parent;
21− asynchronous: root.asynchronous;
20+ asynchronous: false;
22 visible: status == Loader.Ready;
21 visible: status == Loader.Ready;
23 sourceComponent: UbuntuShape {
22 sourceComponent: UbuntuShape {
24 objectName: "background";
23 objectName: "background";
tests/plugins/Dash/cardcreator/11.res+3−4
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
@@ -18,7 +17,7 @@ Loader {
18 id: backgroundLoader;
17 id: backgroundLoader;
19 objectName: "backgroundLoader";
18 objectName: "backgroundLoader";
20 anchors.fill: parent;
19 anchors.fill: parent;
21− asynchronous: root.asynchronous;
20+ asynchronous: true;
22 visible: status == Loader.Ready;
21 visible: status == Loader.Ready;
23 sourceComponent: UbuntuShape {
22 sourceComponent: UbuntuShape {
24 objectName: "background";
23 objectName: "background";
@@ -63,7 +62,7 @@ Item {
63 objectName: "artShapeLoader";
62 objectName: "artShapeLoader";
64 readonly property string cardArt: cardData && cardData["art"] || decodeURI("%5C");
63 readonly property string cardArt: cardData && cardData["art"] || decodeURI("%5C");
65 active: cardArt != "";
64 active: cardArt != "";
66− asynchronous: root.asynchronous;
65+ asynchronous: true;
67 visible: status == Loader.Ready;
66 visible: status == Loader.Ready;
68 sourceComponent: Item {
67 sourceComponent: Item {
69 id: artShape;
68 id: artShape;
@@ -120,7 +119,7 @@ Item {
120 id: artImage;
119 id: artImage;
121 objectName: "artImage";
120 objectName: "artImage";
122 source: artShapeLoader.cardArt;
121 source: artShapeLoader.cardArt;
123− asynchronous: root.asynchronous;
122+ asynchronous: true;
124 width: root.width;
123 width: root.width;
125 height: width / artShape.aspect;
124 height: width / artShape.aspect;
126 onStatusChanged: if (status === Image.Error) source = decodeURI("%5C");
125 onStatusChanged: if (status === Image.Error) source = decodeURI("%5C");
tests/plugins/Dash/cardcreator/11.res.cardcreator+3−4
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
@@ -18,7 +17,7 @@ Loader {
18 id: backgroundLoader;
17 id: backgroundLoader;
19 objectName: "backgroundLoader";
18 objectName: "backgroundLoader";
20 anchors.fill: parent;
19 anchors.fill: parent;
21− asynchronous: root.asynchronous;
20+ asynchronous: false;
22 visible: status == Loader.Ready;
21 visible: status == Loader.Ready;
23 sourceComponent: UbuntuShape {
22 sourceComponent: UbuntuShape {
24 objectName: "background";
23 objectName: "background";
@@ -63,7 +62,7 @@ Item {
63 objectName: "artShapeLoader";
62 objectName: "artShapeLoader";
64 readonly property string cardArt: cardData && cardData["art"] || "";
63 readonly property string cardArt: cardData && cardData["art"] || "";
65 active: cardArt != "";
64 active: cardArt != "";
66− asynchronous: root.asynchronous;
65+ asynchronous: false;
67 visible: status == Loader.Ready;
66 visible: status == Loader.Ready;
68 sourceComponent: Item {
67 sourceComponent: Item {
69 id: artShape;
68 id: artShape;
@@ -120,7 +119,7 @@ Item {
120 id: artImage;
119 id: artImage;
121 objectName: "artImage";
120 objectName: "artImage";
122 source: artShapeLoader.cardArt;
121 source: artShapeLoader.cardArt;
123− asynchronous: root.asynchronous;
122+ asynchronous: false;
124 width: root.width;
123 width: root.width;
125 height: width / artShape.aspect;
124 height: width / artShape.aspect;
126 }
125 }
tests/plugins/Dash/cardcreator/2.res+1−2
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
@@ -18,7 +17,7 @@ Loader {
18 id: backgroundLoader;
17 id: backgroundLoader;
19 objectName: "backgroundLoader";
18 objectName: "backgroundLoader";
20 anchors.fill: parent;
19 anchors.fill: parent;
21− asynchronous: root.asynchronous;
20+ asynchronous: true;
22 visible: status == Loader.Ready;
21 visible: status == Loader.Ready;
23 sourceComponent: UbuntuShape {
22 sourceComponent: UbuntuShape {
24 objectName: "background";
23 objectName: "background";
tests/plugins/Dash/cardcreator/2.res.cardcreator+1−2
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
@@ -18,7 +17,7 @@ Loader {
18 id: backgroundLoader;
17 id: backgroundLoader;
19 objectName: "backgroundLoader";
18 objectName: "backgroundLoader";
20 anchors.fill: parent;
19 anchors.fill: parent;
21− asynchronous: root.asynchronous;
20+ asynchronous: false;
22 visible: status == Loader.Ready;
21 visible: status == Loader.Ready;
23 sourceComponent: UbuntuShape {
22 sourceComponent: UbuntuShape {
24 objectName: "background";
23 objectName: "background";
tests/plugins/Dash/cardcreator/3.res+2−3
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
@@ -25,7 +24,7 @@ Item {
25 objectName: "artShapeLoader";
24 objectName: "artShapeLoader";
26 readonly property string cardArt: cardData && cardData["art"] || decodeURI("IHAVE%5C%22ESCAPED%5C%22QUOTES%5C%22");
25 readonly property string cardArt: cardData && cardData["art"] || decodeURI("IHAVE%5C%22ESCAPED%5C%22QUOTES%5C%22");
27 active: cardArt != "";
26 active: cardArt != "";
28− asynchronous: root.asynchronous;
27+ asynchronous: true;
29 visible: status == Loader.Ready;
28 visible: status == Loader.Ready;
30 sourceComponent: Item {
29 sourceComponent: Item {
31 id: artShape;
30 id: artShape;
@@ -82,7 +81,7 @@ Item {
82 id: artImage;
81 id: artImage;
83 objectName: "artImage";
82 objectName: "artImage";
84 source: artShapeLoader.cardArt;
83 source: artShapeLoader.cardArt;
85− asynchronous: root.asynchronous;
84+ asynchronous: true;
86 width: root.width;
85 width: root.width;
87 height: width / artShape.aspect;
86 height: width / artShape.aspect;
88 onStatusChanged: if (status === Image.Error) source = decodeURI("IHAVE%5C%22ESCAPED%5C%22QUOTES%5C%22");
87 onStatusChanged: if (status === Image.Error) source = decodeURI("IHAVE%5C%22ESCAPED%5C%22QUOTES%5C%22");
tests/plugins/Dash/cardcreator/3.res.cardcreator+2−3
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
@@ -25,7 +24,7 @@ Item {
25 objectName: "artShapeLoader";
24 objectName: "artShapeLoader";
26 readonly property string cardArt: cardData && cardData["art"] || "";
25 readonly property string cardArt: cardData && cardData["art"] || "";
27 active: cardArt != "";
26 active: cardArt != "";
28− asynchronous: root.asynchronous;
27+ asynchronous: false;
29 visible: status == Loader.Ready;
28 visible: status == Loader.Ready;
30 sourceComponent: Item {
29 sourceComponent: Item {
31 id: artShape;
30 id: artShape;
@@ -82,7 +81,7 @@ Item {
82 id: artImage;
81 id: artImage;
83 objectName: "artImage";
82 objectName: "artImage";
84 source: artShapeLoader.cardArt;
83 source: artShapeLoader.cardArt;
85− asynchronous: root.asynchronous;
84+ asynchronous: false;
86 width: root.width;
85 width: root.width;
87 height: width / artShape.aspect;
86 height: width / artShape.aspect;
88 }
87 }
tests/plugins/Dash/cardcreator/4.res+1−2
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
@@ -33,7 +32,7 @@ data: [
33Loader {
32Loader {
34 id: mascotShapeLoader;
33 id: mascotShapeLoader;
35 objectName: "mascotShapeLoader";
34 objectName: "mascotShapeLoader";
36− asynchronous: root.asynchronous;
35+ asynchronous: true;
37 active: mascotImage.status === Image.Ready;
36 active: mascotImage.status === Image.Ready;
38 visible: showHeader && active && status == Loader.Ready;
37 visible: showHeader && active && status == Loader.Ready;
39 width: units.gu(6);
38 width: units.gu(6);
tests/plugins/Dash/cardcreator/4.res.cardcreator+1−2
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
@@ -33,7 +32,7 @@ data: [
33Loader {
32Loader {
34 id: mascotShapeLoader;
33 id: mascotShapeLoader;
35 objectName: "mascotShapeLoader";
34 objectName: "mascotShapeLoader";
36− asynchronous: root.asynchronous;
35+ asynchronous: false;
37 active: mascotImage.status === Image.Ready;
36 active: mascotImage.status === Image.Ready;
38 visible: showHeader && active && status == Loader.Ready;
37 visible: showHeader && active && status == Loader.Ready;
39 width: units.gu(6);
38 width: units.gu(6);
tests/plugins/Dash/cardcreator/5.res+3−4
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: false;
14 enabled: false;
@@ -25,7 +24,7 @@ Item {
25 objectName: "artShapeLoader";
24 objectName: "artShapeLoader";
26 readonly property string cardArt: cardData && cardData["art"] || "";
25 readonly property string cardArt: cardData && cardData["art"] || "";
27 active: cardArt != "";
26 active: cardArt != "";
28− asynchronous: root.asynchronous;
27+ asynchronous: true;
29 visible: status == Loader.Ready;
28 visible: status == Loader.Ready;
30 sourceComponent: Item {
29 sourceComponent: Item {
31 id: artShape;
30 id: artShape;
@@ -82,7 +81,7 @@ Item {
82 id: artImage;
81 id: artImage;
83 objectName: "artImage";
82 objectName: "artImage";
84 source: artShapeLoader.cardArt;
83 source: artShapeLoader.cardArt;
85− asynchronous: root.asynchronous;
84+ asynchronous: true;
86 width: root.width;
85 width: root.width;
87 height: width / artShape.aspect;
86 height: width / artShape.aspect;
88 }
87 }
@@ -94,7 +93,7 @@ Loader {
94 readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
93 readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
95 anchors.fill: artShapeHolder;
94 anchors.fill: artShapeHolder;
96 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
95 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
97− asynchronous: root.asynchronous;
96+ asynchronous: true;
98 visible: showHeader && status == Loader.Ready;
97 visible: showHeader && status == Loader.Ready;
99 sourceComponent: UbuntuShapeOverlay {
98 sourceComponent: UbuntuShapeOverlay {
100 id: overlay;
99 id: overlay;
tests/plugins/Dash/cardcreator/5.res.cardcreator+4−5
@@ -9,8 +9,7 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13− property bool showHeader: true;
12+ property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: false;
14 enabled: false;
16
15
@@ -25,7 +24,7 @@ Item {
25 objectName: "artShapeLoader";
24 objectName: "artShapeLoader";
26 readonly property string cardArt: cardData && cardData["art"] || "";
25 readonly property string cardArt: cardData && cardData["art"] || "";
27 active: cardArt != "";
26 active: cardArt != "";
28− asynchronous: root.asynchronous;
27+ asynchronous: false;
29 visible: status == Loader.Ready;
28 visible: status == Loader.Ready;
30 sourceComponent: Item {
29 sourceComponent: Item {
31 id: artShape;
30 id: artShape;
@@ -82,7 +81,7 @@ Item {
82 id: artImage;
81 id: artImage;
83 objectName: "artImage";
82 objectName: "artImage";
84 source: artShapeLoader.cardArt;
83 source: artShapeLoader.cardArt;
85− asynchronous: root.asynchronous;
84+ asynchronous: false;
86 width: root.width;
85 width: root.width;
87 height: width / artShape.aspect;
86 height: width / artShape.aspect;
88 }
87 }
@@ -94,7 +93,7 @@ Loader {
94 readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
93 readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
95 anchors.fill: artShapeHolder;
94 anchors.fill: artShapeHolder;
96 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
95 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
97− asynchronous: root.asynchronous;
96+ asynchronous: false;
98 visible: showHeader && status == Loader.Ready;
97 visible: showHeader && status == Loader.Ready;
99 sourceComponent: UbuntuShapeOverlay {
98 sourceComponent: UbuntuShapeOverlay {
100 id: overlay;
99 id: overlay;
tests/plugins/Dash/cardcreator/6.res+1−2
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
@@ -18,7 +17,7 @@ Loader {
18 id: backgroundLoader;
17 id: backgroundLoader;
19 objectName: "backgroundLoader";
18 objectName: "backgroundLoader";
20 anchors.fill: parent;
19 anchors.fill: parent;
21− asynchronous: root.asynchronous;
20+ asynchronous: true;
22 visible: status == Loader.Ready;
21 visible: status == Loader.Ready;
23 sourceComponent: UbuntuShape {
22 sourceComponent: UbuntuShape {
24 objectName: "background";
23 objectName: "background";
tests/plugins/Dash/cardcreator/6.res.cardcreator+1−2
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
@@ -18,7 +17,7 @@ Loader {
18 id: backgroundLoader;
17 id: backgroundLoader;
19 objectName: "backgroundLoader";
18 objectName: "backgroundLoader";
20 anchors.fill: parent;
19 anchors.fill: parent;
21− asynchronous: root.asynchronous;
20+ asynchronous: false;
22 visible: status == Loader.Ready;
21 visible: status == Loader.Ready;
23 sourceComponent: UbuntuShape {
22 sourceComponent: UbuntuShape {
24 objectName: "background";
23 objectName: "background";
tests/plugins/Dash/cardcreator/7.res+1−2
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
@@ -18,7 +17,7 @@ Loader {
18 id: backgroundLoader;
17 id: backgroundLoader;
19 objectName: "backgroundLoader";
18 objectName: "backgroundLoader";
20 anchors.fill: parent;
19 anchors.fill: parent;
21− asynchronous: root.asynchronous;
20+ asynchronous: true;
22 visible: status == Loader.Ready;
21 visible: status == Loader.Ready;
23 sourceComponent: UbuntuShape {
22 sourceComponent: UbuntuShape {
24 objectName: "background";
23 objectName: "background";
tests/plugins/Dash/cardcreator/7.res.cardcreator+2−3
@@ -9,8 +9,7 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13− property bool showHeader: true;
12+ property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
16
15
@@ -18,7 +17,7 @@ Loader {
18 id: backgroundLoader;
17 id: backgroundLoader;
19 objectName: "backgroundLoader";
18 objectName: "backgroundLoader";
20 anchors.fill: parent;
19 anchors.fill: parent;
21− asynchronous: root.asynchronous;
20+ asynchronous: false;
22 visible: status == Loader.Ready;
21 visible: status == Loader.Ready;
23 sourceComponent: UbuntuShape {
22 sourceComponent: UbuntuShape {
24 objectName: "background";
23 objectName: "background";
tests/plugins/Dash/cardcreator/8.res+1−2
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
@@ -18,7 +17,7 @@ Loader {
18 id: backgroundLoader;
17 id: backgroundLoader;
19 objectName: "backgroundLoader";
18 objectName: "backgroundLoader";
20 anchors.fill: parent;
19 anchors.fill: parent;
21− asynchronous: root.asynchronous;
20+ asynchronous: true;
22 visible: status == Loader.Ready;
21 visible: status == Loader.Ready;
23 sourceComponent: UbuntuShape {
22 sourceComponent: UbuntuShape {
24 objectName: "background";
23 objectName: "background";
tests/plugins/Dash/cardcreator/8.res.cardcreator+1−2
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
@@ -18,7 +17,7 @@ Loader {
18 id: backgroundLoader;
17 id: backgroundLoader;
19 objectName: "backgroundLoader";
18 objectName: "backgroundLoader";
20 anchors.fill: parent;
19 anchors.fill: parent;
21− asynchronous: root.asynchronous;
20+ asynchronous: false;
22 visible: status == Loader.Ready;
21 visible: status == Loader.Ready;
23 sourceComponent: UbuntuShape {
22 sourceComponent: UbuntuShape {
24 objectName: "background";
23 objectName: "background";
tests/plugins/Dash/cardcreator/9.res−1
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;
tests/plugins/Dash/cardcreator/9.res.cardcreator−1
@@ -9,7 +9,6 @@ AbstractButton {
9 property int fixedHeaderHeight: -1;
9 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
11 readonly property string title: cardData && cardData["title"] || "";
12− property bool asynchronous: true;
13 property bool showHeader: true;
12 property bool showHeader: true;
14 implicitWidth: childrenRect.width;
13 implicitWidth: childrenRect.width;
15 enabled: true;
14 enabled: true;