Bug 454182

Summary: message (part) size display: please follow BinaryUnitDialect everywhere
Product: [Applications] kmail2 Reporter: Erik Quaeghebeur <bugs.kde.org>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 5.19.3   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=364321
Latest Commit: Version Fixed In: 5.20.2
Bug Depends on: 57240    
Bug Blocks:    

Description Erik Quaeghebeur 2022-05-21 20:32:54 UTC
SUMMARY
KMail does not seem to follow the BinaryUnitDialect config option everywhere. Likely it is just a matter of replacing some function with some higher-level ones, as in a few places, KMail does do the right thing.

STEPS TO REPRODUCE
1. Set BinaryUnitDialect=2 in [Locale] section of $KDEHOME/.config/kdeglobals (setting to metric/SI instead of IEC)
2. Start KMail
3. Look at message sizes is message list, part sizes in part list and attachment list

OBSERVED RESULT
IEC formatting is used instead of metric for part sizes in part list and attachment list (metric is used in the message list)

EXPECTED RESULT
Metric formatting is used everywhere

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
The BinaryUnitDialect config option is described in Bug 57240. This option is for now still without a GUI, but Bug 364321 makes it clear this is about to change. So apps like KMail should be made ready to follow BinaryUnitDialect.
Comment 1 Laurent Montel 2022-05-23 06:13:43 UTC
Git commit 7b956ab759445ef9b556ee67b60ba3a6292bed9e by Laurent Montel.
Committed on 23/05/2022 at 06:13.
Pushed by mlaurent into branch 'release/22.04'.

Fix bug 454182: message (part) size display: please follow BinaryUnitDialect everywhere
FIXED-IN: 5.20.2

M  +4    -3    messagecomposer/src/attachment/attachmentmodel.cpp
M  +2    -1    messagecomposer/src/composer/composerviewinterface.cpp
M  +1    -1    messagecore/src/attachment/attachmentfromurljob.cpp
M  +3    -2    messagecore/src/attachment/attachmentpropertiesdialog.cpp
M  +2    -2    messageviewer/src/viewer/mimeparttree/mimetreemodel.cpp

https://invent.kde.org/pim/messagelib/commit/7b956ab759445ef9b556ee67b60ba3a6292bed9e
Comment 2 Laurent Montel 2022-05-23 06:50:03 UTC
Git commit 3150b97b3e33971b01f8c6d71c2c5d11430fe729 by Laurent Montel.
Committed on 23/05/2022 at 06:49.
Pushed by mlaurent into branch 'release/22.04'.

Follow BinaryUnitDialect option

M  +2    -2    src/collectionpage/collectionquotawidget.cpp
M  +2    -2    src/editor/attachment/attachmentview.cpp

https://invent.kde.org/pim/kmail/commit/3150b97b3e33971b01f8c6d71c2c5d11430fe729
Comment 3 Laurent Montel 2022-05-23 06:56:58 UTC
Git commit 668e3f0dc451b24dadff554ba5e4cbc8d656481c by Laurent Montel.
Committed on 23/05/2022 at 06:56.
Pushed by mlaurent into branch 'master'.

Follow BinaryUnitDialect option

M  +1    -0    src/core/CMakeLists.txt
M  +4    -6    src/core/models/statisticsproxymodel.cpp
M  +2    -2    src/widgets/collectiongeneralpropertiespage.cpp
M  +3    -2    src/widgets/collectionmaintenancepage.cpp
M  +2    -2    src/widgets/collectionstatisticsdelegate.cpp

https://invent.kde.org/pim/akonadi/commit/668e3f0dc451b24dadff554ba5e4cbc8d656481c
Comment 4 Laurent Montel 2022-05-23 06:59:24 UTC
Git commit c596517c73748271a113cd5e9be6798eaf1d48ee by Laurent Montel.
Committed on 23/05/2022 at 06:58.
Pushed by mlaurent into branch 'master'.

Follow BinaryUnitDialect option

M  +3    -3    src/formatter/articleformatter.cpp

https://invent.kde.org/pim/akregator/commit/c596517c73748271a113cd5e9be6798eaf1d48ee
Comment 5 Laurent Montel 2022-05-23 07:01:21 UTC
Git commit a9a35fc0ccd33f445c8d67518c827a8b36e829d0 by Laurent Montel.
Committed on 23/05/2022 at 07:00.
Pushed by mlaurent into branch 'master'.

Fix follow BinaryUnitDialect

M  +2    -2    src/messagemodel.cpp

https://invent.kde.org/pim/akonadi-mime/commit/a9a35fc0ccd33f445c8d67518c827a8b36e829d0
Comment 6 Laurent Montel 2022-05-23 11:51:43 UTC
Git commit 5d650a87a4c8aebafc4181f1628f08131741d5a3 by Laurent Montel.
Committed on 23/05/2022 at 11:51.
Pushed by mlaurent into branch 'master'.

Fix follow BinaryUnitDialect

M  +2    -2    app/browsemainpage.cpp
M  +2    -2    lib/imagemetainfomodel.cpp
M  +3    -3    lib/resize/resizeimagedialog.cpp

https://invent.kde.org/graphics/gwenview/commit/5d650a87a4c8aebafc4181f1628f08131741d5a3