on xenial help sign in
"Remove unused hasAttributes variable" doesn't belong to this branch, revert
4e5585eAlbert Astals
qml/Dash/CardTool.qml+8−5
@@ -169,16 +169,19 @@ Item {
169
169
170 Item {
170 Item {
171 id: attributesModel
171 id: attributesModel
172− property int numOfAttributes: {
172+ property int numOfAttributes: 0
173+ property var model: []
174+ property bool hasAttributes: {
173 var attributes = components["attributes"];
175 var attributes = components["attributes"];
174− if ((attributes != undefined) && attributes["field"]) {
176+ var hasAttributesFlag = (attributes != undefined) && attributes["field"];
177+
178+ if (hasAttributesFlag) {
175 if (attributes["max-count"]) {
179 if (attributes["max-count"]) {
176− return attributes["max-count"];
180+ numOfAttributes = attributes["max-count"];
177 }
181 }
178 }
182 }
179− return 0;
183+ return hasAttributesFlag
180 }
184 }
181− property var model: []
182
185
183 onNumOfAttributesChanged: {
186 onNumOfAttributesChanged: {
184 model = []
187 model = []