Bug 483815 - Unit conversion runner does not detect KB as kilobytes
Summary: Unit conversion runner does not detect KB as kilobytes
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: converter (show other bugs)
Version: 6.0.2
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-17 10:09 UTC by Kishore Gopalakrishnan
Modified: 2024-03-27 02:57 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kishore Gopalakrishnan 2024-03-17 10:09:38 UTC
SUMMARY
The unit conversion runner thinks 'KB' (note the use of uppercase) stands for kilobits, rather than kilobytes.


STEPS TO REPRODUCE
1. Type '1 KB' (without the quotes) in krunner

OBSERVED RESULT
0.125 kilobytes is shown as a unit conversion (i.e. the input is interpreted as 1 kilobit)

EXPECTED RESULT
KB should be kilobytes (just like GB=gigabytes)

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.9-arch1-1 (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Typing 1 kB is interpreted as kilobyte.
Comment 1 Nick 2024-03-23 18:25:37 UTC
Duplicated on Neon 6.0.2. Looks like a bug to me. Enter 1 Mb as well and the answer is 125 kilobytes. Confirmed.
Comment 2 Bug Janitor Service 2024-03-23 18:53:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kunitconversion/-/merge_requests/47
Comment 3 Natalie Clarius 2024-03-27 02:57:22 UTC
Git commit 0acee867fd2911dd4d5f37fae84e313f0940aadc by Natalie Clarius.
Committed on 27/03/2024 at 01:32.
Pushed by nclarius into branch 'master'.

binary_data: add match strings with {upper/lower}case k for kilo- and kibi-{bits/bytes}

M  +32   -32   src/binary_data.cpp

https://invent.kde.org/frameworks/kunitconversion/-/commit/0acee867fd2911dd4d5f37fae84e313f0940aadc