on xenial help sign in
"Remove unused hasAttributes variable" doesn't belong to this branch, revert
commit4e5585e3d8e2d33c990e56c3c0bad30cb2c69374 authorAlbert Astals <albert.astals@canonical.com> dateTue 26 Aug 2014, 11:51 (12 years ago) parent96d8d9d
1 file changed+8−5
qml/Dash/CardTool.qml+8−5
qml/Dash/CardTool.qml+8−5
@@ -169,16 +169,19 @@ Item {
169169
170170 Item {
171171 id: attributesModel
172− property int numOfAttributes: {
172+ property int numOfAttributes: 0
173+ property var model: []
174+ property bool hasAttributes: {
173175 var attributes = components["attributes"];
174− if ((attributes != undefined) && attributes["field"]) {
176+ var hasAttributesFlag = (attributes != undefined) && attributes["field"];
177+
178+ if (hasAttributesFlag) {
175179 if (attributes["max-count"]) {
176− return attributes["max-count"];
180+ numOfAttributes = attributes["max-count"];
177181 }
178182 }
179− return 0;
183+ return hasAttributesFlag
180184 }
181− property var model: []
182185
183186 onNumOfAttributesChanged: {
184187 model = []