Commit 9d3f3cde authored byBrowse files
Refactor precision- and percentage-handling
The precision -1 was used in places where it meant "use the default precision". For KLocale, this went through decimalPlaces() and usually returned 2. For QLocale, this is invalid, and 6 is normally used. This meant that 1% was displayed as 1.000000%, which is kind of useless, just like 24KiB/s was displayed as 24.000000KiB/s -- implying a network which could conceivably also transmit 1 bit in a little over 2 minutes, and measure that accurately. Provide convenience methods (static, inline) for providing more sensible precisions.
Showing with 22 additions and 5 deletions