on xenial help sign in
Fix warnings
commit7c045b516ea8a97ca63d66578a6e0425730ba901 authorAndrea Cimitan <andrea.cimitan@gmail.com> dateMon 19 May 2014, 16:53 (12 years ago) parentbcb22f4
7 files changed+15−15
plugins/Dash/CardCreator.js+3−3 qml/Dash/CardCarousel.qml+1−1 tests/plugins/Dash/cardcreator/1.res+3−3 tests/plugins/Dash/cardcreator/2.res+1−1 tests/plugins/Dash/cardcreator/3.res+3−3 tests/plugins/Dash/cardcreator/4.res+1−1 tests/plugins/Dash/cardcreator/5.res+3−3
plugins/Dash/CardCreator.js+3−3
@@ -70,10 +70,9 @@ var kArtShapeHolderCode = 'Item { \n\
7070 radius: "medium"; \n\
7171 readonly property real aspect: components !== undefined ? components["art"]["aspect-ratio"] : 1; \n\
7272 readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect; \n\
73− Component.onCompleted: updateWidthHeightBindings(); \n\
73+ Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; } \n\
7474 onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings(); \n\
7575 visible: image.status == Image.Ready; \n\
76− borderSource: artShapeBorderSource; \n\
7776 function updateWidthHeightBindings() { \n\
7877 if (aspectSmallerThanImageAspect) { \n\
7978 width = Qt.binding(function() { return !visible ? 0 : image.width }); \n\
@@ -281,7 +280,7 @@ function cardString(template, components) {
281280 property var template; \n\
282281 property var components; \n\
283282 property var cardData; \n\
284− property var artShapeBorderSource; \n\
283+ property var artShapeBorderSource: undefined; \n\
285284 property real fontScale: 1.0; \n\
286285 property int headerAlignment: Text.AlignLeft; \n\
287286 property int fixedHeaderHeight: -1; \n\
@@ -307,6 +306,7 @@ function cardString(template, components) {
307306 }
308307
309308 if (hasArt) {
309+ code += 'onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; } \n';
310310 code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
311311
312312 var widthCode, heightCode;
qml/Dash/CardCarousel.qml+1−1
@@ -34,7 +34,7 @@ DashRenderer {
3434 Carousel {
3535 id: carousel
3636 anchors.fill: parent
37− tileAspectRatio: cardCarousel.components && cardCarousel.components["art"]["aspect-ratio"] || 1.0
37+ tileAspectRatio: cardTool.components && cardTool.components["art"]["aspect-ratio"] || 1.0
3838 // FIXME we need to "reverse" the carousel to make the selected item the size
3939 // and push others back.
4040 minimumTileWidth: cardTool.cardWidth / selectedItemScaleFactor
tests/plugins/Dash/cardcreator/1.res+3−3
@@ -3,7 +3,7 @@ AbstractButton {
33 property var template;
44 property var components;
55 property var cardData;
6− property var artShapeBorderSource;
6+ property var artShapeBorderSource: undefined;
77 property real fontScale: 1.0;
88 property int headerAlignment: Text.AlignLeft;
99 property int fixedHeaderHeight: -1;
@@ -12,6 +12,7 @@ AbstractButton {
1212 property bool asynchronous: true;
1313 property bool showHeader: true;
1414 implicitWidth: childrenRect.width;
15+onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
1516readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
1617Item {
1718 id: artShapeHolder;
@@ -30,10 +31,9 @@ Item {
3031 radius: "medium";
3132 readonly property real aspect: components !== undefined ? components["art"]["aspect-ratio"] : 1;
3233 readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect;
33− Component.onCompleted: updateWidthHeightBindings();
34+ Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
3435 onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings();
3536 visible: image.status == Image.Ready;
36− borderSource: artShapeBorderSource;
3737 function updateWidthHeightBindings() {
3838 if (aspectSmallerThanImageAspect) {
3939 width = Qt.binding(function() { return !visible ? 0 : image.width });
tests/plugins/Dash/cardcreator/2.res+1−1
@@ -3,7 +3,7 @@ AbstractButton {
33 property var template;
44 property var components;
55 property var cardData;
6− property var artShapeBorderSource;
6+ property var artShapeBorderSource: undefined;
77 property real fontScale: 1.0;
88 property int headerAlignment: Text.AlignLeft;
99 property int fixedHeaderHeight: -1;
tests/plugins/Dash/cardcreator/3.res+3−3
@@ -3,7 +3,7 @@ AbstractButton {
33 property var template;
44 property var components;
55 property var cardData;
6− property var artShapeBorderSource;
6+ property var artShapeBorderSource: undefined;
77 property real fontScale: 1.0;
88 property int headerAlignment: Text.AlignLeft;
99 property int fixedHeaderHeight: -1;
@@ -12,6 +12,7 @@ AbstractButton {
1212 property bool asynchronous: true;
1313 property bool showHeader: true;
1414 implicitWidth: childrenRect.width;
15+onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
1516readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
1617Item {
1718 id: artShapeHolder;
@@ -30,10 +31,9 @@ Item {
3031 radius: "medium";
3132 readonly property real aspect: components !== undefined ? components["art"]["aspect-ratio"] : 1;
3233 readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect;
33− Component.onCompleted: updateWidthHeightBindings();
34+ Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
3435 onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings();
3536 visible: image.status == Image.Ready;
36− borderSource: artShapeBorderSource;
3737 function updateWidthHeightBindings() {
3838 if (aspectSmallerThanImageAspect) {
3939 width = Qt.binding(function() { return !visible ? 0 : image.width });
tests/plugins/Dash/cardcreator/4.res+1−1
@@ -3,7 +3,7 @@ AbstractButton {
33 property var template;
44 property var components;
55 property var cardData;
6− property var artShapeBorderSource;
6+ property var artShapeBorderSource: undefined;
77 property real fontScale: 1.0;
88 property int headerAlignment: Text.AlignLeft;
99 property int fixedHeaderHeight: -1;
tests/plugins/Dash/cardcreator/5.res+3−3
@@ -3,7 +3,7 @@ AbstractButton {
33 property var template;
44 property var components;
55 property var cardData;
6− property var artShapeBorderSource;
6+ property var artShapeBorderSource: undefined;
77 property real fontScale: 1.0;
88 property int headerAlignment: Text.AlignLeft;
99 property int fixedHeaderHeight: -1;
@@ -12,6 +12,7 @@ AbstractButton {
1212 property bool asynchronous: true;
1313 property bool showHeader: true;
1414 implicitWidth: childrenRect.width;
15+onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
1516readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
1617Item {
1718 id: artShapeHolder;
@@ -30,10 +31,9 @@ Item {
3031 radius: "medium";
3132 readonly property real aspect: components !== undefined ? components["art"]["aspect-ratio"] : 1;
3233 readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect;
33− Component.onCompleted: updateWidthHeightBindings();
34+ Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
3435 onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings();
3536 visible: image.status == Image.Ready;
36− borderSource: artShapeBorderSource;
3737 function updateWidthHeightBindings() {
3838 if (aspectSmallerThanImageAspect) {
3939 width = Qt.binding(function() { return !visible ? 0 : image.width });