KFormat: Replace byte specific implementation with generic one
Needs ReviewPublic

Authored by bruns on Jun 17 2018, 5:59 PM.

Details

Reviewers
None
Group Reviewers
Frameworks
Maniphest Tasks
T8500: Add HIG rules about use of units/symbols in (config) UI
Summary

There is no need for duplicate implementations. As formatValue covers
a superset, call it from formatByteSize, mapping the prefix enums.

Test Plan

make test

Diff Detail

Repository
R244 KCoreAddons
Branch
D13584
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 842
Build 855: arc lint + arc unit
bruns created this revision.Jun 17 2018, 5:59 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJun 17 2018, 5:59 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Jun 17 2018, 5:59 PM

I've been running with it for a while and found no issues, but only giving +1 this time because of the fallout from the other patch (which I didn't catch, so others should have a look)

dfaure added a subscriber: dfaure.Aug 8 2018, 8:19 AM

I don't really know this code, but one thing that could be done to ensure that the change is safe, is to increase unittest coverage (which is already not too bad, but more would be safer)

https://build.kde.org/job/Frameworks%20kcoreaddons%20kf5-qt5%20SUSEQt5.10/100/cobertura/src_lib_util/kformatprivate_cpp/

Can we please take a look at this before continuing here?