Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.0, 6.8.2, 6.9.0 RC
-
-
5
-
cdcaaaeee (dev), 754666dbe (dev), ea3d2b24c (dev), d1879c3a3 (dev), 8f955142e (6.9), 18a08d81f (6.9), d94d5bcd6 (6.9), 3632b2cb4 (6.8), a09bdcf72 (6.8)
-
Foundation Sprint 127, Foundation Sprint 128
Description
It looks like if the same symbol (dot in this case), is used as the decimal symbol and the digit grouping symbol, then toDouble() gives different result with Qt5 and Qt6. For example, with the following code:
bool ok; QLocale loc; double number = loc.toDouble("0.003", &ok); qDebug() << "LOCALE DOUBLE" << number << ok;
Qt5 outputs:
LOCALE DOUBLE 0.003 true
With Qt6 you get:
LOCALE DOUBLE 3 true