[Qgis-developer] Qt 5.5 Conversion from QVariant to QString is broken for double and float values

Denis Rouzaud denis.rouzaud at gmail.com
Mon Aug 15 06:45:32 PDT 2016


Hi all,

While looking at failing tests on Qt5, it seems that QgsJSONUtils test
is failing due to a regression on Qt 5.5.
Conversion from QVariant to QString is broken for double and float
values [0].
It seems to have been fixed in Qt 5.7

Especially QgsJSONUtils.encodeValue(5.9) returns '5.9000000000000004'.

What would you suggest?

* Don't care and discard failing test with Qt 5.5 - 5.6? (is this really
an issue?)
* Use a custom toString method to fix this?
* Bump min Qt version to 5.7?
* ....?

Cheers,
Denis


[0] https://bugreports.qt.io/browse/QTBUG-47192
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160815/f886a5bf/attachment.html>


More information about the Qgis-developer mailing list