Skip to content

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

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.


@ahiemstra @davidedmundson

5.27, please.

No longer shows 1000 Watts as 1 WattHour.

For Plasma 6 we might want to add KiloAmpere, KiloWatt, KiloWattHour, etc and/or rethink how this prefix stuff is done altogether.

Unit test fails because of !266 (merged)

Edited by Kai Uwe Broulik

Merge request reports