Skip to content

Formatter: Don't try to prefix units that we don't have a prefixed version of

Kai Uwe Broulik requested to merge work/cherry-pick-b0754b14 into Plasma/5.27

Otherwise we would roll over to the next unrelated unit. For example trying to display 1000 Watts results in it trying to use 1 Watts + prefix kilo (1), which ends up at the next unit "WattHour", which makes no sense.

Check whether the prefixed unit has the same base as the one we try to format. We'd rather show a million Watts than the wrong unit to begin with.

(cherry picked from commit b0754b14)

@ahiemstra

Merge request reports

Loading