← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~rpadovani/ubuntu-calculator-app/tempResultOnlyInParenthesis into lp:ubuntu-calculator-app

 

Riccardo Padovani has proposed merging lp:~rpadovani/ubuntu-calculator-app/tempResultOnlyInParenthesis into lp:ubuntu-calculator-app.

Commit message:
Remove * from operators with priority

Requested reviews:
  Ubuntu Calculator Developers (ubuntu-calculator-dev)

For more details, see:
https://code.launchpad.net/~rpadovani/ubuntu-calculator-app/tempResultOnlyInParenthesis/+merge/279473

We try to help users calculating temporary results. Unfortunately at the moment the feature is confusing, 'cause we calculate the temporary result just after a * operator.

So if the users write 
3*3^3
we print
9^3

Then user presses = and we print 27 (that is right) but is confusing because 9^3 = 81.

So we can calculate temporary result only in the parenthesis, cause nothing has priorty > than parenthesis  
-- 
Your team Ubuntu Calculator Developers is requested to review the proposed merge of lp:~rpadovani/ubuntu-calculator-app/tempResultOnlyInParenthesis into lp:ubuntu-calculator-app.
=== modified file 'app/ubuntu-calculator-app.qml'
--- app/ubuntu-calculator-app.qml	2015-11-28 20:44:02 +0000
+++ app/ubuntu-calculator-app.qml	2015-12-03 16:45:49 +0000
@@ -182,7 +182,7 @@
         }
 
         // Add here operators that have always priority
-        if ((visual.toString() === "*") || (visual.toString() === ")")) {
+        if (visual.toString() === ")") {
             isFormulaIsValidToCalculate = true;
         }
     }


Follow ups