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

Nyall Dawson nyall.dawson at gmail.com
Tue Aug 16 15:09:31 PDT 2016


On 15 August 2016 at 23:45, Denis Rouzaud <denis.rouzaud at gmail.com> wrote:
> 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?
> * ....?

IMHO Qt really dropped the ball on this one. Such an annoying blocking
bug to have present in their LTS release!

I'd go with:
- minimum recommended version >= 5.7
- allow builds with 5.5/5.6, but with a prominent warning in the
release note that strings such as map grids, etc will be ugly!

I'd love to just say we put a hard minimum version of 5.7 (and avoid
all the numerous bug reports which are bound to come in!), but I don't
think that's realistic given the glacial pace some of our supported
distributions move at...

Nyall



>
> Cheers,
> Denis
>
>
> [0] https://bugreports.qt.io/browse/QTBUG-47192
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list