← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-fix into lp:ubuntu-calculator-app

 

Bartosz Kosiorek has proposed merging lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-fix into lp:ubuntu-calculator-app.

Commit message:
Fix for cannot close parenthesis (LP: #1616270)

Requested reviews:
  Ubuntu Calculator Developers (ubuntu-calculator-dev)
Related bugs:
  Bug #1616270 in Ubuntu Calculator App: "Cannot close parenthesis"
  https://bugs.launchpad.net/ubuntu-calculator-app/+bug/1616270

For more details, see:
https://code.launchpad.net/~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-fix/+merge/303842

Fix for cannot close parenthesis (LP: #1616270)
-- 
Your team Ubuntu Calculator Developers is requested to review the proposed merge of lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-fix into lp:ubuntu-calculator-app.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2016-03-01 16:54:27 +0000
+++ CMakeLists.txt	2016-08-24 16:25:27 +0000
@@ -33,7 +33,7 @@
 set(MAIN_QML                        ${APP_HARDCODE}.qml)
 set(ICON_FILE                       "${APP_HARDCODE}.png")
 set(DESKTOP_FILE                    "${APP_HARDCODE}.desktop")
-set(APP_VERSION                     2.0)
+set(APP_VERSION                     2.2)
 set(AUTOPILOT_DIR                   ubuntu_calculator_app)
 
 if(CLICK_MODE)

=== modified file 'app/engine/formula.js'
--- app/engine/formula.js	2016-07-27 13:13:29 +0000
+++ app/engine/formula.js	2016-08-24 16:25:27 +0000
@@ -130,8 +130,8 @@
     }
 
     // Calculate how many brackets are opened
-    var numberOfOpenedBrackets = (longFormula.match(/\(/g) || []).length -
-                                (longFormula.match(/\)/g) || []).length;
+    var numberOfOpenedBrackets = (formulaToCheck.match(/\(/g) || []).length -
+                                (formulaToCheck.match(/\)/g) || []).length;
 
     if (numberOfOpenedBrackets < 1) {
         return false;
@@ -150,7 +150,7 @@
     if (formulaToCheck === '') {
         return "(";
     }
-    var lastChar = longFormula.substring(formulaToCheck.length - 1, formulaToCheck.length);
+    var lastChar = formulaToCheck.substring(formulaToCheck.length - 1, formulaToCheck.length);
 
     if (isNaN(lastChar) && lastChar !== ")" && lastChar !== "i" && lastChar !== "E"  && lastChar !== "!") {
         return "(";

=== modified file 'debian/changelog'
--- debian/changelog	2016-01-19 01:29:15 +0000
+++ debian/changelog	2016-08-24 16:25:27 +0000
@@ -1,4 +1,10 @@
-ubuntu-calculator-app (2.1) UNRELEASED; urgency=medium
+ubuntu-calculator-app (2.2) xenial; urgency=medium
+
+  * Cannot close parenthesis (LP: #1616270)
+
+ -- Bartosz Kosiorek <gang65@xxxxxxxxxxxxxx>  Wed, 24 Aug 2016 18:16:57 +0200
+
+ubuntu-calculator-app (2.1) xenial; urgency=medium
 
   [ Bartosz Kosiorek ]
   * Fix evaluation of long complex numbers (LP: #1515600)
@@ -16,7 +22,7 @@
   [ Michal Predotka ]
   * Add graphics and improve layout of walkthrough (LP: #1442804)
 
- -- Bartosz Kosiorek <gang65@xxxxxxxxxxxxxx>  Thu, 14 Jan 2016 00:07:59 +0100
+ -- Bartosz Kosiorek <gang65@xxxxxxxxxxxxxx>  Wed, 24 Aug 2016 18:15:25 +0200
 
 ubuntu-calculator-app (2.0.233) vivid; urgency=medium
 


Follow ups