Bug 472111 - Respect the users' choice of BinaryUnitDialect
Summary: Respect the users' choice of BinaryUnitDialect
Status: RESOLVED FIXED
Alias: None
Product: filelight
Classification: Applications
Component: general (show other bugs)
Version: 23.04.3
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-09 22:16 UTC by Jack Hill
Modified: 2023-07-21 21:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: Frameworks 6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Hill 2023-07-09 22:16:24 UTC
SUMMARY
A user can choose to prefer SI unit prefixes for their binary numbers by adding the following to ~/.config/kdeglobals:

    [Locale]
    BinaryUnitDialect=2

but FileLight does not respect this choice. Instead it continues to use IEC units.

STEPS TO REPRODUCE
1. Add the aforementioned lines to the kdeglobals file
2. Open filelight
3. Start scanning a folder

OBSERVED RESULT
Size is given like "19.1 MiB"

EXPECTED RESULT
Size is given like "20.1 MB" (it's a 20,056,162 byte file)

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20230707
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.10
Kernel Version: 6.3.9-1-default (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2023-07-10 12:03:42 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/filelight/-/merge_requests/88
Comment 2 Bug Janitor Service 2023-07-11 15:43:34 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kcoreaddons/-/merge_requests/352
Comment 3 Jack Hill 2023-07-15 20:20:35 UTC
Git commit 58cb8fcc5f8290cf2ecac5c3f5ebd9ac69aa8f10 by Jack Hill.
Committed on 12/07/2023 at 17:01.
Pushed by cullmann into branch 'master'.

Use BinaryUnitDialect from config when using DefaultBinaryDialect in formatByteSize

Still fall back to IECBinaryDialect if the value isn't set, or isn't set
properly.
Related: bug 453853

M  +8    -2    src/lib/util/kformatprivate.cpp

https://invent.kde.org/frameworks/kcoreaddons/-/commit/58cb8fcc5f8290cf2ecac5c3f5ebd9ac69aa8f10