Bug 507685 - Kcalc should not change value when changing base
Summary: Kcalc should not change value when changing base
Status: REPORTED
Alias: None
Product: kcalc
Classification: Applications
Component: general (other bugs)
Version First Reported In: 24.12.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Gabriel Barrantes
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-31 09:01 UTC by Aaron Williams
Modified: 2025-11-21 15:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Numera system view (51.37 KB, image/png)
2025-08-16 16:36 UTC, Gabriel Barrantes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Williams 2025-07-31 09:01:56 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY
I frequently need to change between base 10 and base 16 and older versions of KCalc allowed me to easily do this by clicking buttons. With the new KCalc, when I change the base the value does not switch between bases 10 and 16, but remains the same. For example, if I have the value 400 hex and I switch to base 10, it should change to 1024 and the binary representation should be the same. This is not the case, however, and changing from 400 hex changes the value to 400d, which is NOT the same at all. This makes KCalc almost useless when changing between hex and decimal. I also really miss the buttons to allow me to switch between formats with a single click rather than the drop-down menu.

STEPS TO REPRODUCE
1. Put kcalc in hex mode
2. Enter 400
3. Switch to decimal

OBSERVED RESULT
The value changes from 400 hex (1024) to 400 decimal (0x190). 

EXPECTED RESULT
I expect the value shown to be updated when the base changes.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
The old KCalc allowed me to easily click on binary digits, which would update the hex or decimal value shown. This often no longer works. It seems there was a very significant regression in functionality between KDE5 and KDE6 with KCalc.
Comment 1 Gabriel Barrantes 2025-08-16 16:36:24 UTC
Created attachment 184161 [details]
Numera system view

The latest version has a new "Numeral system view" to show the number on all bases at once.
Comment 2 Kevin Chadwick 2025-11-06 18:12:52 UTC
Yes the numeral system view is improved such as for very large numbers but completely broken when switching between hex and decimal or octal. 255 in decimal becomes 255 in hex instead of 0xff
Comment 3 Kevin Chadwick 2025-11-06 18:12:52 UTC
Yes the numeral system view is improved such as for very large numbers but completely broken when switching between hex and decimal or octal. 255 in decimal becomes 255 in hex instead of 0xff
Comment 4 Kevin Chadwick 2025-11-06 18:19:42 UTC
I like the copy number feature too btw :-)
Comment 5 Kevin Chadwick 2025-11-21 14:40:10 UTC
I assume the changes were an attempt to match gnome-calculators features and for the most part it does and looks a bit nicer but unless this feature can be fixed then programmer calculator mode users were better off with KDE5s kcalc. I have switched my panel calc icon to gome-calculator for now which has some of the changes without this regression.
Comment 6 Kevin Chadwick 2025-11-21 15:11:31 UTC
(In reply to Kevin Chadwick from comment #5)
> I assume the changes were an attempt to match gnome-calculators features and
> for the most part it does and looks a bit nicer but unless this feature can
> be fixed then programmer calculator mode users were better off with KDE5s
> kcalc. I have switched my panel calc icon to gome-calculator for now which
> has some of the changes without this regression.

SO that was a premature comment. They appear to behave the same. In some ways it's better and Kcalc is better than gnome-calcuator in that you can switch from Hex to Decimal using the copy feature but it takes like four actions (copy, switch, delete, paste) instead of one with the old kcalc. A switch working format drop down might be nice if it isn't more confusing?
Comment 7 Kevin Chadwick 2025-11-21 15:14:09 UTC
Maybe the Hex|Dec|Oct|Bin label in the display area can be a drop down?