on xenial help sign in
Remove unused hasAttributes variable

Approved by: Ying-Chun Liu

commit8604d682dba1cc80f40fbb366bb77aaf2969fa17 authorAlbert Astals <albert.astals@canonical.com> dateMon 8 Sep 2014, 14:11 (12 years ago) parente1a2a2f5e8bbf5
1 file changed+5−8
qml/Dash/CardTool.qml+5−8
qml/Dash/CardTool.qml+5−8
@@ -169,19 +169,16 @@ Item {
169169
170170 Item {
171171 id: attributesModel
172− property int numOfAttributes: 0
173− property var model: []
174− property bool hasAttributes: {
172+ property int numOfAttributes: {
175173 var attributes = components["attributes"];
176− var hasAttributesFlag = (attributes != undefined) && attributes["field"];
177−
178− if (hasAttributesFlag) {
174+ if ((attributes != undefined) && attributes["field"]) {
179175 if (attributes["max-count"]) {
180− numOfAttributes = attributes["max-count"];
176+ return attributes["max-count"];
181177 }
182178 }
183− return hasAttributesFlag
179+ return 0;
184180 }
181+ property var model: []
185182
186183 onNumOfAttributesChanged: {
187184 model = []