Make KIO::convertSize() use KFormat::formatByteSize(), instead of using
an own copy of the same function. The handling of the user
configuration of the default dialect is left as-is, and it should work
fine since the two enums BinaryUnitDialect (the removed one, and the
one in KFormat) are the same.
Details
Builds fine, no changes to the result of KIO::convertSize().
Diff Detail
- Repository
- R241 KIO
- Branch
- kformat (branched from master)
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 317 Build 317: arc lint + arc unit
src/core/global.cpp | ||
---|---|---|
44 | Am i reading the code wrong or are we doing the readEntry twice? (i know the old code did the same) Do you understand why? |
src/core/global.cpp | ||
---|---|---|
44 |
Apparently so.
No, that is why I chose to not touch at all, keeping the behaviour unchanged (it is not related to this patch, anyway). |
src/core/global.cpp | ||
---|---|---|
58 | Should this -1 be 1? Looking at the kformat code it'll use that unless unit is 0 so the old code would be using 1 and the new one -1 |
src/core/global.cpp | ||
---|---|---|
58 | Indeed, 1 is the right value, and KFormat does the right thing when the unit is byte. |
i guess you can commit this, i don't see anything totally wrong and makes sense, so if you've tested it and you're confident it's fine please go ahead.