Merge lp:~aacid/unity8/removeUnusedHasAttributes into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: MichaƂ Sawicz
Approved revision: 1201
Merged at revision: 1238
Proposed branch: lp:~aacid/unity8/removeUnusedHasAttributes
Merge into: lp:unity8
Diff against target: 28 lines (+5/-8)
1 file modified
qml/Dash/CardTool.qml (+5/-8)
To merge this branch: bzr merge lp:~aacid/unity8/removeUnusedHasAttributes
Reviewer Review Type Date Requested Status
Ying-Chun Liu (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+232100@code.launchpad.net

Commit message

Remove unused hasAttributes variable

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * Did you make sure that your branch does not contain spurious tags?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
1201. By Albert Astals Cid

Merge

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ying-Chun Liu (paulliu) wrote :

Looks good. Working good.
BTW, why model is moved after numOfAttributes?. Doesn't matter, just curious.

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes.

 * Did CI run pass? If not, please explain why.
Yes previously.

review: Approve
Revision history for this message
Albert Astals Cid (aacid) wrote :

> Looks good. Working good.
> BTW, why model is moved after numOfAttributes?. Doesn't matter, just curious.

It was always after numOfAttributes.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Dash/CardTool.qml'
2--- qml/Dash/CardTool.qml 2014-08-11 11:10:36 +0000
3+++ qml/Dash/CardTool.qml 2014-08-28 07:40:41 +0000
4@@ -169,19 +169,16 @@
5
6 Item {
7 id: attributesModel
8- property int numOfAttributes: 0
9- property var model: []
10- property bool hasAttributes: {
11+ property int numOfAttributes: {
12 var attributes = components["attributes"];
13- var hasAttributesFlag = (attributes != undefined) && attributes["field"];
14-
15- if (hasAttributesFlag) {
16+ if ((attributes != undefined) && attributes["field"]) {
17 if (attributes["max-count"]) {
18- numOfAttributes = attributes["max-count"];
19+ return attributes["max-count"];
20 }
21 }
22- return hasAttributesFlag
23+ return 0;
24 }
25+ property var model: []
26
27 onNumOfAttributesChanged: {
28 model = []

Subscribers

People subscribed via source and target branches