on xenial help sign in
asynchronous is only false on the fake card in cardtool
07566ccAlbert 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
@@ -196,7 +196,6 @@ Item {
196 sourceComponent: CardCreatorCache.getCardComponent(cardTool.template, cardTool.components, true);
196 sourceComponent: CardCreatorCache.getCardComponent(cardTool.template, cardTool.components, true);
197 onLoaded: {
197 onLoaded: {
198 item.objectName = "cardToolCard";
198 item.objectName = "cardToolCard";
199− item.asynchronous = false;
200 item.width = Qt.binding(function() { return cardTool.cardWidth !== -1 ? cardTool.cardWidth : item.implicitWidth; });
199 item.width = Qt.binding(function() { return cardTool.cardWidth !== -1 ? cardTool.cardWidth : item.implicitWidth; });
201 item.height = Qt.binding(function() { return cardTool.cardHeight !== -1 ? cardTool.cardHeight : item.implicitHeight; });
200 item.height = Qt.binding(function() { return cardTool.cardHeight !== -1 ? cardTool.cardHeight : item.implicitHeight; });
202 }
201 }
tests/plugins/Dash/cardcreator/1.res+3−4
@@ -8,8 +8,7 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12− property bool showHeader: true;
11+ property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
15
14
@@ -24,7 +23,7 @@ Item {
24 objectName: "artShapeLoader";
23 objectName: "artShapeLoader";
25 readonly property string cardArt: cardData && cardData["art"] || "";
24 readonly property string cardArt: cardData && cardData["art"] || "";
26 active: cardArt != "";
25 active: cardArt != "";
27− asynchronous: root.asynchronous;
26+ asynchronous: true;
28 visible: status == Loader.Ready;
27 visible: status == Loader.Ready;
29 sourceComponent: Item {
28 sourceComponent: Item {
30 id: artShape;
29 id: artShape;
@@ -81,7 +80,7 @@ Item {
81 id: artImage;
80 id: artImage;
82 objectName: "artImage";
81 objectName: "artImage";
83 source: artShapeLoader.cardArt;
82 source: artShapeLoader.cardArt;
84− asynchronous: root.asynchronous;
83+ asynchronous: true;
85 width: root.width;
84 width: root.width;
86 height: width / artShape.aspect;
85 height: width / artShape.aspect;
87 }
86 }
tests/plugins/Dash/cardcreator/1.res.cardcreator+2−3
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
@@ -24,7 +23,7 @@ Item {
24 objectName: "artShapeLoader";
23 objectName: "artShapeLoader";
25 readonly property string cardArt: cardData && cardData["art"] || "";
24 readonly property string cardArt: cardData && cardData["art"] || "";
26 active: cardArt != "";
25 active: cardArt != "";
27− asynchronous: root.asynchronous;
26+ asynchronous: false;
28 visible: status == Loader.Ready;
27 visible: status == Loader.Ready;
29 sourceComponent: Item {
28 sourceComponent: Item {
30 id: artShape;
29 id: artShape;
@@ -81,7 +80,7 @@ Item {
81 id: artImage;
80 id: artImage;
82 objectName: "artImage";
81 objectName: "artImage";
83 source: artShapeLoader.cardArt;
82 source: artShapeLoader.cardArt;
84− asynchronous: root.asynchronous;
83+ asynchronous: false;
85 width: root.width;
84 width: root.width;
86 height: width / artShape.aspect;
85 height: width / artShape.aspect;
87 }
86 }
tests/plugins/Dash/cardcreator/10.res+1−2
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
@@ -17,7 +16,7 @@ Loader {
17 id: backgroundLoader;
16 id: backgroundLoader;
18 objectName: "backgroundLoader";
17 objectName: "backgroundLoader";
19 anchors.fill: parent;
18 anchors.fill: parent;
20− asynchronous: root.asynchronous;
19+ asynchronous: true;
21 visible: status == Loader.Ready;
20 visible: status == Loader.Ready;
22 sourceComponent: UbuntuShape {
21 sourceComponent: UbuntuShape {
23 objectName: "background";
22 objectName: "background";
tests/plugins/Dash/cardcreator/10.res.cardcreator+1−2
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
@@ -17,7 +16,7 @@ Loader {
17 id: backgroundLoader;
16 id: backgroundLoader;
18 objectName: "backgroundLoader";
17 objectName: "backgroundLoader";
19 anchors.fill: parent;
18 anchors.fill: parent;
20− asynchronous: root.asynchronous;
19+ asynchronous: false;
21 visible: status == Loader.Ready;
20 visible: status == Loader.Ready;
22 sourceComponent: UbuntuShape {
21 sourceComponent: UbuntuShape {
23 objectName: "background";
22 objectName: "background";
tests/plugins/Dash/cardcreator/11.res+3−4
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
@@ -17,7 +16,7 @@ Loader {
17 id: backgroundLoader;
16 id: backgroundLoader;
18 objectName: "backgroundLoader";
17 objectName: "backgroundLoader";
19 anchors.fill: parent;
18 anchors.fill: parent;
20− asynchronous: root.asynchronous;
19+ asynchronous: true;
21 visible: status == Loader.Ready;
20 visible: status == Loader.Ready;
22 sourceComponent: UbuntuShape {
21 sourceComponent: UbuntuShape {
23 objectName: "background";
22 objectName: "background";
@@ -62,7 +61,7 @@ Item {
62 objectName: "artShapeLoader";
61 objectName: "artShapeLoader";
63 readonly property string cardArt: cardData && cardData["art"] || decodeURI("%5C");
62 readonly property string cardArt: cardData && cardData["art"] || decodeURI("%5C");
64 active: cardArt != "";
63 active: cardArt != "";
65− asynchronous: root.asynchronous;
64+ asynchronous: true;
66 visible: status == Loader.Ready;
65 visible: status == Loader.Ready;
67 sourceComponent: Item {
66 sourceComponent: Item {
68 id: artShape;
67 id: artShape;
@@ -119,7 +118,7 @@ Item {
119 id: artImage;
118 id: artImage;
120 objectName: "artImage";
119 objectName: "artImage";
121 source: artShapeLoader.cardArt;
120 source: artShapeLoader.cardArt;
122− asynchronous: root.asynchronous;
121+ asynchronous: true;
123 width: root.width;
122 width: root.width;
124 height: width / artShape.aspect;
123 height: width / artShape.aspect;
125 onStatusChanged: if (status === Image.Error) source = decodeURI("%5C");
124 onStatusChanged: if (status === Image.Error) source = decodeURI("%5C");
tests/plugins/Dash/cardcreator/11.res.cardcreator+3−4
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
@@ -17,7 +16,7 @@ Loader {
17 id: backgroundLoader;
16 id: backgroundLoader;
18 objectName: "backgroundLoader";
17 objectName: "backgroundLoader";
19 anchors.fill: parent;
18 anchors.fill: parent;
20− asynchronous: root.asynchronous;
19+ asynchronous: false;
21 visible: status == Loader.Ready;
20 visible: status == Loader.Ready;
22 sourceComponent: UbuntuShape {
21 sourceComponent: UbuntuShape {
23 objectName: "background";
22 objectName: "background";
@@ -62,7 +61,7 @@ Item {
62 objectName: "artShapeLoader";
61 objectName: "artShapeLoader";
63 readonly property string cardArt: cardData && cardData["art"] || "";
62 readonly property string cardArt: cardData && cardData["art"] || "";
64 active: cardArt != "";
63 active: cardArt != "";
65− asynchronous: root.asynchronous;
64+ asynchronous: false;
66 visible: status == Loader.Ready;
65 visible: status == Loader.Ready;
67 sourceComponent: Item {
66 sourceComponent: Item {
68 id: artShape;
67 id: artShape;
@@ -119,7 +118,7 @@ Item {
119 id: artImage;
118 id: artImage;
120 objectName: "artImage";
119 objectName: "artImage";
121 source: artShapeLoader.cardArt;
120 source: artShapeLoader.cardArt;
122− asynchronous: root.asynchronous;
121+ asynchronous: false;
123 width: root.width;
122 width: root.width;
124 height: width / artShape.aspect;
123 height: width / artShape.aspect;
125 }
124 }
tests/plugins/Dash/cardcreator/2.res+1−2
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
@@ -17,7 +16,7 @@ Loader {
17 id: backgroundLoader;
16 id: backgroundLoader;
18 objectName: "backgroundLoader";
17 objectName: "backgroundLoader";
19 anchors.fill: parent;
18 anchors.fill: parent;
20− asynchronous: root.asynchronous;
19+ asynchronous: true;
21 visible: status == Loader.Ready;
20 visible: status == Loader.Ready;
22 sourceComponent: UbuntuShape {
21 sourceComponent: UbuntuShape {
23 objectName: "background";
22 objectName: "background";
tests/plugins/Dash/cardcreator/2.res.cardcreator+1−2
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
@@ -17,7 +16,7 @@ Loader {
17 id: backgroundLoader;
16 id: backgroundLoader;
18 objectName: "backgroundLoader";
17 objectName: "backgroundLoader";
19 anchors.fill: parent;
18 anchors.fill: parent;
20− asynchronous: root.asynchronous;
19+ asynchronous: false;
21 visible: status == Loader.Ready;
20 visible: status == Loader.Ready;
22 sourceComponent: UbuntuShape {
21 sourceComponent: UbuntuShape {
23 objectName: "background";
22 objectName: "background";
tests/plugins/Dash/cardcreator/3.res+2−3
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
@@ -24,7 +23,7 @@ Item {
24 objectName: "artShapeLoader";
23 objectName: "artShapeLoader";
25 readonly property string cardArt: cardData && cardData["art"] || decodeURI("IHAVE%5C%22ESCAPED%5C%22QUOTES%5C%22");
24 readonly property string cardArt: cardData && cardData["art"] || decodeURI("IHAVE%5C%22ESCAPED%5C%22QUOTES%5C%22");
26 active: cardArt != "";
25 active: cardArt != "";
27− asynchronous: root.asynchronous;
26+ asynchronous: true;
28 visible: status == Loader.Ready;
27 visible: status == Loader.Ready;
29 sourceComponent: Item {
28 sourceComponent: Item {
30 id: artShape;
29 id: artShape;
@@ -81,7 +80,7 @@ Item {
81 id: artImage;
80 id: artImage;
82 objectName: "artImage";
81 objectName: "artImage";
83 source: artShapeLoader.cardArt;
82 source: artShapeLoader.cardArt;
84− asynchronous: root.asynchronous;
83+ asynchronous: true;
85 width: root.width;
84 width: root.width;
86 height: width / artShape.aspect;
85 height: width / artShape.aspect;
87 onStatusChanged: if (status === Image.Error) source = decodeURI("IHAVE%5C%22ESCAPED%5C%22QUOTES%5C%22");
86 onStatusChanged: if (status === Image.Error) source = decodeURI("IHAVE%5C%22ESCAPED%5C%22QUOTES%5C%22");
tests/plugins/Dash/cardcreator/3.res.cardcreator+2−3
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
@@ -24,7 +23,7 @@ Item {
24 objectName: "artShapeLoader";
23 objectName: "artShapeLoader";
25 readonly property string cardArt: cardData && cardData["art"] || "";
24 readonly property string cardArt: cardData && cardData["art"] || "";
26 active: cardArt != "";
25 active: cardArt != "";
27− asynchronous: root.asynchronous;
26+ asynchronous: false;
28 visible: status == Loader.Ready;
27 visible: status == Loader.Ready;
29 sourceComponent: Item {
28 sourceComponent: Item {
30 id: artShape;
29 id: artShape;
@@ -81,7 +80,7 @@ Item {
81 id: artImage;
80 id: artImage;
82 objectName: "artImage";
81 objectName: "artImage";
83 source: artShapeLoader.cardArt;
82 source: artShapeLoader.cardArt;
84− asynchronous: root.asynchronous;
83+ asynchronous: false;
85 width: root.width;
84 width: root.width;
86 height: width / artShape.aspect;
85 height: width / artShape.aspect;
87 }
86 }
tests/plugins/Dash/cardcreator/4.res+1−2
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
@@ -32,7 +31,7 @@ data: [
32Loader {
31Loader {
33 id: mascotShapeLoader;
32 id: mascotShapeLoader;
34 objectName: "mascotShapeLoader";
33 objectName: "mascotShapeLoader";
35− asynchronous: root.asynchronous;
34+ asynchronous: true;
36 active: mascotImage.status === Image.Ready;
35 active: mascotImage.status === Image.Ready;
37 visible: showHeader && active && status == Loader.Ready;
36 visible: showHeader && active && status == Loader.Ready;
38 width: units.gu(6);
37 width: units.gu(6);
tests/plugins/Dash/cardcreator/4.res.cardcreator+1−2
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
@@ -32,7 +31,7 @@ data: [
32Loader {
31Loader {
33 id: mascotShapeLoader;
32 id: mascotShapeLoader;
34 objectName: "mascotShapeLoader";
33 objectName: "mascotShapeLoader";
35− asynchronous: root.asynchronous;
34+ asynchronous: false;
36 active: mascotImage.status === Image.Ready;
35 active: mascotImage.status === Image.Ready;
37 visible: showHeader && active && status == Loader.Ready;
36 visible: showHeader && active && status == Loader.Ready;
38 width: units.gu(6);
37 width: units.gu(6);
tests/plugins/Dash/cardcreator/5.res+3−4
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: false;
13 enabled: false;
@@ -24,7 +23,7 @@ Item {
24 objectName: "artShapeLoader";
23 objectName: "artShapeLoader";
25 readonly property string cardArt: cardData && cardData["art"] || "";
24 readonly property string cardArt: cardData && cardData["art"] || "";
26 active: cardArt != "";
25 active: cardArt != "";
27− asynchronous: root.asynchronous;
26+ asynchronous: true;
28 visible: status == Loader.Ready;
27 visible: status == Loader.Ready;
29 sourceComponent: Item {
28 sourceComponent: Item {
30 id: artShape;
29 id: artShape;
@@ -81,7 +80,7 @@ Item {
81 id: artImage;
80 id: artImage;
82 objectName: "artImage";
81 objectName: "artImage";
83 source: artShapeLoader.cardArt;
82 source: artShapeLoader.cardArt;
84− asynchronous: root.asynchronous;
83+ asynchronous: true;
85 width: root.width;
84 width: root.width;
86 height: width / artShape.aspect;
85 height: width / artShape.aspect;
87 }
86 }
@@ -93,7 +92,7 @@ Loader {
93 readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
92 readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
94 anchors.fill: artShapeHolder;
93 anchors.fill: artShapeHolder;
95 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
94 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
96− asynchronous: root.asynchronous;
95+ asynchronous: true;
97 visible: showHeader && status == Loader.Ready;
96 visible: showHeader && status == Loader.Ready;
98 sourceComponent: UbuntuShapeOverlay {
97 sourceComponent: UbuntuShapeOverlay {
99 id: overlay;
98 id: overlay;
tests/plugins/Dash/cardcreator/5.res.cardcreator+4−5
@@ -8,8 +8,7 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12− property bool showHeader: true;
11+ property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: false;
13 enabled: false;
15
14
@@ -24,7 +23,7 @@ Item {
24 objectName: "artShapeLoader";
23 objectName: "artShapeLoader";
25 readonly property string cardArt: cardData && cardData["art"] || "";
24 readonly property string cardArt: cardData && cardData["art"] || "";
26 active: cardArt != "";
25 active: cardArt != "";
27− asynchronous: root.asynchronous;
26+ asynchronous: false;
28 visible: status == Loader.Ready;
27 visible: status == Loader.Ready;
29 sourceComponent: Item {
28 sourceComponent: Item {
30 id: artShape;
29 id: artShape;
@@ -81,7 +80,7 @@ Item {
81 id: artImage;
80 id: artImage;
82 objectName: "artImage";
81 objectName: "artImage";
83 source: artShapeLoader.cardArt;
82 source: artShapeLoader.cardArt;
84− asynchronous: root.asynchronous;
83+ asynchronous: false;
85 width: root.width;
84 width: root.width;
86 height: width / artShape.aspect;
85 height: width / artShape.aspect;
87 }
86 }
@@ -93,7 +92,7 @@ Loader {
93 readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
92 readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
94 anchors.fill: artShapeHolder;
93 anchors.fill: artShapeHolder;
95 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
94 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
96− asynchronous: root.asynchronous;
95+ asynchronous: false;
97 visible: showHeader && status == Loader.Ready;
96 visible: showHeader && status == Loader.Ready;
98 sourceComponent: UbuntuShapeOverlay {
97 sourceComponent: UbuntuShapeOverlay {
99 id: overlay;
98 id: overlay;
tests/plugins/Dash/cardcreator/6.res+1−2
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
@@ -17,7 +16,7 @@ Loader {
17 id: backgroundLoader;
16 id: backgroundLoader;
18 objectName: "backgroundLoader";
17 objectName: "backgroundLoader";
19 anchors.fill: parent;
18 anchors.fill: parent;
20− asynchronous: root.asynchronous;
19+ asynchronous: true;
21 visible: status == Loader.Ready;
20 visible: status == Loader.Ready;
22 sourceComponent: UbuntuShape {
21 sourceComponent: UbuntuShape {
23 objectName: "background";
22 objectName: "background";
tests/plugins/Dash/cardcreator/6.res.cardcreator+1−2
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
@@ -17,7 +16,7 @@ Loader {
17 id: backgroundLoader;
16 id: backgroundLoader;
18 objectName: "backgroundLoader";
17 objectName: "backgroundLoader";
19 anchors.fill: parent;
18 anchors.fill: parent;
20− asynchronous: root.asynchronous;
19+ asynchronous: false;
21 visible: status == Loader.Ready;
20 visible: status == Loader.Ready;
22 sourceComponent: UbuntuShape {
21 sourceComponent: UbuntuShape {
23 objectName: "background";
22 objectName: "background";
tests/plugins/Dash/cardcreator/7.res+1−2
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
@@ -17,7 +16,7 @@ Loader {
17 id: backgroundLoader;
16 id: backgroundLoader;
18 objectName: "backgroundLoader";
17 objectName: "backgroundLoader";
19 anchors.fill: parent;
18 anchors.fill: parent;
20− asynchronous: root.asynchronous;
19+ asynchronous: true;
21 visible: status == Loader.Ready;
20 visible: status == Loader.Ready;
22 sourceComponent: UbuntuShape {
21 sourceComponent: UbuntuShape {
23 objectName: "background";
22 objectName: "background";
tests/plugins/Dash/cardcreator/7.res.cardcreator+2−3
@@ -8,8 +8,7 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12− property bool showHeader: true;
11+ property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
15
14
@@ -17,7 +16,7 @@ Loader {
17 id: backgroundLoader;
16 id: backgroundLoader;
18 objectName: "backgroundLoader";
17 objectName: "backgroundLoader";
19 anchors.fill: parent;
18 anchors.fill: parent;
20− asynchronous: root.asynchronous;
19+ asynchronous: false;
21 visible: status == Loader.Ready;
20 visible: status == Loader.Ready;
22 sourceComponent: UbuntuShape {
21 sourceComponent: UbuntuShape {
23 objectName: "background";
22 objectName: "background";
tests/plugins/Dash/cardcreator/8.res+1−2
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
@@ -17,7 +16,7 @@ Loader {
17 id: backgroundLoader;
16 id: backgroundLoader;
18 objectName: "backgroundLoader";
17 objectName: "backgroundLoader";
19 anchors.fill: parent;
18 anchors.fill: parent;
20− asynchronous: root.asynchronous;
19+ asynchronous: true;
21 visible: status == Loader.Ready;
20 visible: status == Loader.Ready;
22 sourceComponent: UbuntuShape {
21 sourceComponent: UbuntuShape {
23 objectName: "background";
22 objectName: "background";
tests/plugins/Dash/cardcreator/8.res.cardcreator+1−2
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
@@ -17,7 +16,7 @@ Loader {
17 id: backgroundLoader;
16 id: backgroundLoader;
18 objectName: "backgroundLoader";
17 objectName: "backgroundLoader";
19 anchors.fill: parent;
18 anchors.fill: parent;
20− asynchronous: root.asynchronous;
19+ asynchronous: false;
21 visible: status == Loader.Ready;
20 visible: status == Loader.Ready;
22 sourceComponent: UbuntuShape {
21 sourceComponent: UbuntuShape {
23 objectName: "background";
22 objectName: "background";
tests/plugins/Dash/cardcreator/9.res−1
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;
tests/plugins/Dash/cardcreator/9.res.cardcreator−1
@@ -8,7 +8,6 @@ AbstractButton {
8 property int fixedHeaderHeight: -1;
8 property int fixedHeaderHeight: -1;
9 property size fixedArtShapeSize: Qt.size(-1, -1);
9 property size fixedArtShapeSize: Qt.size(-1, -1);
10 readonly property string title: cardData && cardData["title"] || "";
10 readonly property string title: cardData && cardData["title"] || "";
11− property bool asynchronous: true;
12 property bool showHeader: true;
11 property bool showHeader: true;
13 implicitWidth: childrenRect.width;
12 implicitWidth: childrenRect.width;
14 enabled: true;
13 enabled: true;