Bug 472597

Summary: History reflects operators even when they were subsequently changed
Product: [Applications] kcalc Reporter: kroot001
Component: generalAssignee: Evan Teran <evan.teran>
Status: RESOLVED DUPLICATE    
Severity: normal CC: kroot001, p.r.worrall
Priority: NOR    
Version: 23.04.3   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description kroot001 2023-07-24 21:49:47 UTC
SUMMARY
History will reflect all operators as used in an calculation even if the operator was changed before the calculation was evaluated. 


STEPS TO REPRODUCE
1. Ensure history pane is enabled
2. Type in 8 * (Shows in history as "8 x")
3. Type in /. This operator should overwrite the previous operator.
4. Type in 8 and press Enter or =

OBSERVED RESULT
Calculation returns 1 as the result which is correct as the division replaced the multiplication operator. History however reflects that both operators were evaluated: "8 × 8 ÷ 8 = 1" which is an incorrect result. The 8 between x and ÷ was never input, nor is it evaluated.

EXPECTED RESULT
History should log the calculation as it was evaluated. In this example, history should show "8 ÷ 8 = 1"

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kernel 6.4.3
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
Comment 1 Paul Worrall 2023-07-25 06:33:10 UTC

*** This bug has been marked as a duplicate of bug 454835 ***