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