Merge lp:~mihirsoni/ubuntu-calculator-app/1211262-changedVarName into lp:~ubuntu-calculator-dev/ubuntu-calculator-app/old_trunk

Proposed by Mihir Soni
Status: Merged
Approved by: David Planella
Approved revision: 137
Merged at revision: 136
Proposed branch: lp:~mihirsoni/ubuntu-calculator-app/1211262-changedVarName
Merge into: lp:~ubuntu-calculator-dev/ubuntu-calculator-app/old_trunk
Diff against target: 43 lines (+4/-4)
2 files modified
Simple/CalcLabel.qml (+1/-1)
Simple/Screen.qml (+3/-3)
To merge this branch: bzr merge lp:~mihirsoni/ubuntu-calculator-app/1211262-changedVarName
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
David Planella Approve
Review via email: mp+180075@code.launchpad.net

Commit message

Re-named the variable name

Description of the change

Re-named the variable pencilVisible to newCalculation , as the it uses for the new calculation.

To post a comment you must log in.
Revision history for this message
David Planella (dpm) wrote :

Nice work!

It is just nitpicking, but we might as well get it right:

9 + text: isLast && !newCalculation ? "0" : root.numbers // print 0 if it is new calculation else the existing number.

This needs to read "if it is a new calculation" (the "a" is missing on the original comment)

review: Needs Fixing
137. By Mihir Soni

modified the comment

Revision history for this message
David Planella (dpm) :
review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Simple/CalcLabel.qml'
2--- Simple/CalcLabel.qml 2013-08-14 09:15:43 +0000
3+++ Simple/CalcLabel.qml 2013-08-14 09:49:08 +0000
4@@ -121,7 +121,7 @@
5 font.pixelSize: numbersHeight
6 fontSizeMode: Text.Fit
7 horizontalAlignment: Text.AlignRight
8- text: isLast && !pencilVisible ? "0" : root.numbers
9+ text: isLast && !newCalculation ? "0" : root.numbers // print 0 if it is a new calculation else the existing number.
10 font.family: "Ubuntu"
11 }
12 }
13
14=== modified file 'Simple/Screen.qml'
15--- Simple/Screen.qml 2013-08-09 20:35:38 +0000
16+++ Simple/Screen.qml 2013-08-14 09:49:08 +0000
17@@ -29,7 +29,7 @@
18 transformOrigin: Item.Bottom
19
20 property var ops
21- property var pencilVisible: false
22+ property var newCalculation: false
23 signal useAnswer(string answerToUse, string formulaData)
24 signal labelTextUpdated(int idx, string newText)
25 signal mainLabelUpdated(int idx, string newText)
26@@ -170,7 +170,7 @@
27 id: row
28 height: units.gu(4)
29 width: parent.width
30- visible: !isLastItem || pencilVisible
31+ visible: !isLastItem || newCalculation
32 Item {
33 id: editIcon
34 height: parent.height
35@@ -250,7 +250,7 @@
36 }
37
38 onNumbersChanged: {
39- pencilVisible = true
40+ newCalculation = true
41 }
42 }
43 }

Subscribers

People subscribed via source and target branches