Bug 487659 - can't input decimals without the leading 0
Summary: can't input decimals without the leading 0
Status: RESOLVED FIXED
Alias: None
Product: kcalc
Classification: Applications
Component: general (show other bugs)
Version: 24.05.0
Platform: Arch Linux Linux
: HI grave
Target Milestone: ---
Assignee: Gabriel Barrantes
URL:
Keywords: regression
: 487784 488449 488973 489004 489178 489865 490470 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-05-28 00:16 UTC by medicinole
Modified: 2024-07-19 06:33 UTC (History)
15 users (show)

See Also:
Latest Commit:
Version Fixed In: 24.05.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description medicinole 2024-05-28 00:16:42 UTC
SUMMARY

Before the last update, you could do for example 1+1 (enter) and it spits out 2, then you could press +2 (enter) and it'll spit out 4. 

But now, 1+1 (enter) and it spits out 2, then you press +2 and only the +2 is in its memory so if you press enter, it'll spit out 2 because the previous answer cannot be fetched.

STEPS TO REPRODUCE
1. 1+1, press enter gets you 2
2. directly press +20, press enter 
3. you'll see it spits out 20 and not 22

OBSERVED RESULT

Its impossible to do multiple operations while reading the result, without having to start a new operation by manually typing the old answer. 

EXPECTED RESULT

Like all calculators, it should continue where it left off unless the memory is cleared.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 6.0.5
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Comment 1 medicinole 2024-05-28 00:24:23 UTC
Forgot to mention, there's also a bug now where if I type 20/.4 it gives me an input error where I must type as 20/0.4. It does this under all modes, basic, scientific etc.
Comment 2 medicinole 2024-05-28 00:27:26 UTC
Apologies, it's EndeavourOS Plasma v. 6.0.5
Comment 3 fanzhuyifan 2024-05-28 21:25:33 UTC
The first issue is being tracked in BUG 487566, so I modified the title to be about the decimal point -- cannot input those as .xyz.
Comment 4 fanzhuyifan 2024-05-30 18:01:56 UTC
*** Bug 487784 has been marked as a duplicate of this bug. ***
Comment 6 Bug Janitor Service 2024-05-31 23:39:00 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kcalc/-/merge_requests/91
Comment 7 fanzhuyifan 2024-06-13 16:17:29 UTC
*** Bug 488449 has been marked as a duplicate of this bug. ***
Comment 8 Gabriel Barrantes 2024-06-20 22:22:51 UTC
Git commit 255f8a080656258433bf4108cfd31d8968af4392 by Gabriel Barrantes.
Committed on 20/06/2024 at 20:17.
Pushed by gabrielbarrantes into branch 'master'.

Add support for decimal numbers without integer part

Add parsing support for numbers without explicit integer part, this
allows inputs of the form "[.,]d+", some examples are".1", ".5e10"
and ".5+.5".

M  +6    -0    autotests/kcalc_parser_core_test.cpp
M  +3    -2    kcalc_parser.cpp

https://invent.kde.org/utilities/kcalc/-/commit/255f8a080656258433bf4108cfd31d8968af4392
Comment 9 Gabriel Barrantes 2024-06-21 18:48:16 UTC
Git commit 90c2de1cd5046d740e6522b47bea24cf21d889fe by Gabriel Barrantes.
Committed on 21/06/2024 at 18:45.
Pushed by gabrielbarrantes into branch 'release/24.05'.

Add support for decimal numbers without integer part

Add parsing support for numbers without explicit integer part, this
allows inputs of the form "[.,]d+", some examples are".1", ".5e10"
and ".5+.5".

M  +24   -18   autotests/kcalc_parser_core_test.cpp
M  +3    -2    kcalc_parser.cpp

https://invent.kde.org/utilities/kcalc/-/commit/90c2de1cd5046d740e6522b47bea24cf21d889fe
Comment 10 Antonio Rojas 2024-06-22 12:27:41 UTC
*** Bug 488973 has been marked as a duplicate of this bug. ***
Comment 11 Gabriel Barrantes 2024-06-22 20:00:30 UTC
*** Bug 489004 has been marked as a duplicate of this bug. ***
Comment 12 Heitor da Silva 2024-06-24 21:51:10 UTC
In which released version was it fixed? Because, in version 24.05.1 it wasn't fixed.
Comment 13 fanzhuyifan 2024-06-24 21:52:32 UTC
(In reply to Heitor da Silva from comment #12)
> In which released version was it fixed? Because, in version 24.05.1 it
> wasn't fixed.

24.05.2
Comment 14 Heitor da Silva 2024-06-24 21:57:57 UTC
There is not such a TAG 24.05.2, I wouldn't consider it released, and by consequence, nor resolved.
Comment 15 fanzhuyifan 2024-06-24 22:01:00 UTC
(In reply to Heitor da Silva from comment #14)
> There is not such a TAG 24.05.2, I wouldn't consider it released, and by
> consequence, nor resolved.

It will be fixed in the upcoming 24.05.2 release. If you don't want to wait for the release, you can grab the patch [0] yourself and compile a custom version. Please don't reopen this.

[0]: https://invent.kde.org/utilities/kcalc/-/commit/90c2de1cd5046d740e6522b47bea24cf21d889fe
Comment 16 Gabriel Barrantes 2024-06-25 18:04:08 UTC
*** Bug 489178 has been marked as a duplicate of this bug. ***
Comment 17 logancowan 2024-07-07 10:46:13 UTC
*** Bug 489865 has been marked as a duplicate of this bug. ***
Comment 18 squallcatchall 2024-07-18 19:42:33 UTC
*** Bug 490470 has been marked as a duplicate of this bug. ***
Comment 19 medicinole 2024-07-19 06:32:57 UTC
(In reply to fanzhuyifan from comment #15)
> (In reply to Heitor da Silva from comment #14)
> > There is not such a TAG 24.05.2, I wouldn't consider it released, and by
> > consequence, nor resolved.
> 
> It will be fixed in the upcoming 24.05.2 release. If you don't want to wait
> for the release, you can grab the patch [0] yourself and compile a custom
> version. Please don't reopen this.
> 
> [0]:
> https://invent.kde.org/utilities/kcalc/-/commit/
> 90c2de1cd5046d740e6522b47bea24cf21d889fe

I can't find 24.05.2, only version 1 is in the aur and trying to install via the terminal it only pulls up version 2. Do you know when the aur will be updated? Thanks
Comment 20 medicinole 2024-07-19 06:33:54 UTC
(In reply to medicinole from comment #19)
> (In reply to fanzhuyifan from comment #15)
> > (In reply to Heitor da Silva from comment #14)
> > > There is not such a TAG 24.05.2, I wouldn't consider it released, and by
> > > consequence, nor resolved.
> > 
> > It will be fixed in the upcoming 24.05.2 release. If you don't want to wait
> > for the release, you can grab the patch [0] yourself and compile a custom
> > version. Please don't reopen this.
> > 
> > [0]:
> > https://invent.kde.org/utilities/kcalc/-/commit/
> > 90c2de1cd5046d740e6522b47bea24cf21d889fe
> 
> I can't find 24.05.2, only version 1 is in the aur and trying to install via
> the terminal it only pulls up version 2. Do you know when the aur will be
> updated? Thanks

On terminal it only pulls up version 1*