The calculator plasmoid fails to perform operations that involve more than two terms
Steps to Reproduce:
1. Type 1+1+1=
works fine here, just gave it a try.
In general I would suggest to move the = to the beginning. It helps KRunner to realize that a calculation is following
This is not about the runner, it's about the plasmoid
sorry - misread. I just gave it a try and can reproduce
*** Bug 315935 has been marked as a duplicate of this bug. ***
*** Bug 324140 has been marked as a duplicate of this bug. ***
Created attachment 82226 [details]
This patch should fix the bug
The problem was this: when you enter something like a+b=, then the result is shown. If you now click on a number, you want to start a new calculation. However, the code that implements this behaviour also gets called when clicking on a number after the second operator.
This patch adds a new variable to prevent calling the code when it's not wanted.
(In reply to comment #6)
> Created attachment 82226 [details]
> This patch should fix the bug
Please submit the patch to git.reviewboard.kde.org for reviewing. A patch attached in the bug tracker is easily to be forgotten or ignored.
Git commit 4a25adbac6677db9ca97e3a467004c835bada965 by Sebastian Kügler.
Committed on 11/09/2013 at 18:10.
Pushed by sebas into branch 'master'.
correctly determine input in calculator
The bug reported this behaviour: if you press something like 'a+b+c=',
the result would be incorrect because the calculator plasmoid wrongly
resets the calculator when pressing 'c'. The intended behaviour is that
the calculation is cleared when pressing a number after pressing '='.
This patch adds a variable to determine this situation correctly.
Patch by Paul Rohrbach
M +10 -2 applets/calculator/package/contents/ui/calculator.qml