Summary: | Doesn't do operations with more than two terms | ||
---|---|---|---|
Product: | [Unmaintained] plasma4 | Reporter: | Antonio Rojas <arojas> |
Component: | widget-calculator | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | adaptee, bugs.kde.org, david_johnson, mgraesslin, stupor_scurvy343 |
Priority: | NOR | Keywords: | junior-jobs |
Version: | 4.11.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdeplasma-addons/4a25adbac6677db9ca97e3a467004c835bada965 | Version Fixed In: | 4.11.2 |
Sentry Crash Report: | |||
Attachments: | This patch should fix the bug |
Description
Antonio Rojas
2013-01-25 07:59:43 UTC
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 CCMAIL:p.b.r@gmx.net REVIEW:112674 M +10 -2 applets/calculator/package/contents/ui/calculator.qml http://commits.kde.org/kdeplasma-addons/4a25adbac6677db9ca97e3a467004c835bada965 |