Dec() results not switching to fixed decimal format

Create issue
Issue #789 closed
Jason Jorgensen created an issue

In v0.11 the dec() function would correctly display a hex number converted to decimal. In version 0.12 the display of the converted hex number will always display in exponential notation.

v0.12: dec(0xea5d6800) =3.931990016e9 v0.12.PNG

v0.11: dec(0xea5d6800) =3931990016 v0.11.PNG

Comments (5)

  1. Helder Correia repo owner

    Nothing to do with hex in particular, since also dec(3931990016) = 3,931990016e9 even in Fixed Decimal result format. This is indeed a regression, but I couldn't find out the responsible commit via git bisect, since builds become very dificult when going back in time closer to 0.11 due to all the changes in Qt/CMake/doc requirements. This needs to be debugged by hand. @teyut @polwel please let me know if you have a clue where this might have gotten broken.

  2. Pol Welter

    I have a hunch that it is related to 5658894. There I fixed an issue that very closely resembles this for bin, hex and oct, but not dec. Maybe we just need to add the same thing for dec.

  3. Tey'

    Fixed in 2626c49: format.base was set by dec/hex/oct/bin functions but not format.mode, and this case was not handled by NumberFormatter::format().

  4. Log in to comment