Bug 410988
Needs ReviewPublic

Authored by maximma on Sep 22 2019, 4:47 PM.

Details

Reviewers
cfeck
Group Reviewers
Plasma
Summary

I am not sure how much this is the right solution, because I am not familiar with js at a sufficient level. But having considered all the solutions, I realized that this is one of the simplest solutions. I can’t explain correctly, so I’ll give an example. The user enters a number, say "102.03200". In memory, this will be stored as 10203200 and 5. That is, to get the number back we need 10203200/10 ^ 5. Ok. Only integers are involved in the calculations. A fraction is added only at the output stage.

Diff Detail

Repository
R114 Plasma Addons
Branch
calculatorApplet (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17063
Build 17081: arc lint + arc unit
maximma created this revision.Sep 22 2019, 4:47 PM
Restricted Application added a project: Plasma. · View Herald TranscriptSep 22 2019, 4:47 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
maximma requested review of this revision.Sep 22 2019, 4:47 PM
maximma updated this revision to Diff 66694.EditedSep 23 2019, 6:25 PM

Fixed display of numbers

ngraham added a subscriber: ngraham.
  1. This needs more explanation in the Description section to indicate why the proposed change is a good idea.
  2. This seems like it has some unrelated changes in it, which look worthwhile, but they should be in a separate patch. Is this fixing https://bugs.kde.org/show_bug.cgi?id=410988?
  1. I am not sure where the description window is.
  2. Yes, this fixes this bug. I am not sure how much this is the right solution, because I am not familiar with js at a sufficient level. But having considered all the solutions, I realized that this is one of the simplest solutions. I can’t explain correctly, so I’ll give an example. The user enters a number, say "102.03200". In memory, this will be stored as 10203200 and 5. That is, to get the number back we need 10203200/10 ^ 5.

It also fixes a bug with the display of numbers. And the "C" button does the same as the "AC", because before that, when I clicked on "C" and further calculations, the answer was incorrect or the "C" button seemed not obvious to me.

  1. I am not sure where the description window is.

You can click on the Edit Revision button to add stuff to the description.

  1. Yes, this fixes this bug. I am not sure how much this is the right solution, because I am not familiar with js at a sufficient level. But having considered all the solutions, I realized that this is one of the simplest solutions. I can’t explain correctly, so I’ll give an example. The user enters a number, say "102.03200". In memory, this will be stored as 10203200 and 5. That is, to get the number back we need 10203200/10 ^ 5. It also fixes a bug with the display of numbers. And the "C" button does the same as the "AC", because before that, when I clicked on "C" and further calculations, the answer was incorrect or the "C" button seemed not obvious to me.

Excellent. Could you split this out so we have two patches:

Excellent. Could you split this out so we have two patches:

Yes, could you explain?

Make a second patch that only fixes the bug, and then remove those changes from this patch.

maximma added a comment.EditedSep 26 2019, 5:48 PM

Make a second patch that only fixes the bug, and then remove those changes from this patch.

Do I need to create another page with only bug fix? Or do I need to make another commit only with bug fix? What to do with the correction of the display of numbers?Because I need the changes that are in the fixed bug.

If there are three changes necessary (fix display, fix bug, change C behavior) then we need three patches in a dependency chain. :) See https://community.kde.org/Infrastructure/Phabricator#If_the_patches_are_all_for_the_same_project

maximma added a comment.EditedSep 26 2019, 5:58 PM

ok, how remove changes from those patch?

Change the files to remove those changes using your text editor, then run arc diff.

maximma updated this revision to Diff 66913.Sep 26 2019, 6:45 PM

Bug Fix 410988

maximma retitled this revision from Bug 410988, Button 'C' now does the same as 'AC'. to Bug 410988.Sep 26 2019, 6:46 PM
maximma edited the summary of this revision. (Show Details)Sep 26 2019, 6:49 PM