Details
-
Bug
-
Resolution: Incomplete
-
P3: Somewhat important
-
None
-
5.5.0
-
None
-
Ubuntu 15.04 64bit
Description
Since I made an update from Qt 5.4.1 to Qt 5.5.0, QVariant::toString()-Method returns for example 6.5499999999999998 if it was initialized with double value 6.55. This is due to these changes https://codereview.qt-project.org/#/c/99815/
One effect is that it is not possible to store a double value like this with QSettings and return it as a string exactly like it was stored.
settings->setValue("interval", 6.55);
qDebug() << settings->value("interval").toDouble(); // returns 6.55
qDebug() << settings->value("interval").toString(); //returns 6.5499999999999998
With Qt 5.4.1 toString()-Method returned 6.55 and I think this is more what users are expecting, when using QSettings to store double values.