<div dir="ltr"><div><div><div>Denis,<br><br></div>There's an additional way to mitigate this: <br>1/ requesting Qt devs to apply the patch fixing this issue ( <a href="http://code.qt.io/cgit/qt/qtbase.git/patch/src/corelib/tools/qlocale.h?id=726fed0d67013cbfac7921d3d4613ca83406fb0f">http://code.qt.io/cgit/qt/qtbase.git/patch/src/corelib/tools/qlocale.h?id=726fed0d67013cbfac7921d3d4613ca83406fb0f</a> ) onto Qt 5.6, which after all is a LTS version;<br>2/ requesting distributions - such as Ubuntu and Fedora - to apply the patch onto the packages maintained and offered through their repositories. <br><br>Regarding #2, I've filed such a request earlier today: <a href="https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1620173">https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1620173</a><br><br></div>It's a shame we can't override the QVariant conversion to QString with some code of our own to patch the issue on Qt5 < 5.7.<br><br></div>Math<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 5, 2016 at 12:23 PM, Denis Rouzaud <span dir="ltr"><<a href="mailto:denis.rouzaud@gmail.com" target="_blank">denis.rouzaud@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<font size="-1"><font face="Verdana">Hi Mathieu,<br>
<br>
For reference, here is the Qt issue</font></font><br>
<font size="-1"><font face="Verdana"><a href="https://bugreports.qt.io/browse/QTBUG-47192" target="_blank">https://bugreports.qt.io/<wbr>browse/QTBUG-47192</a><br>
<br>
It's the conversion from QVariant to QString which is broken.<br>
<br>
There are several ways to deal with this:<br>
* fix this for some versions of Qt (no idea how)<br>
* require Qt 5.7+ <br>
* ship like this with a warning notice<br>
<br>
The discussion already arised and the latter seems to be prefered:<br>
<a href="https://lists.osgeo.org/pipermail/qgis-developer/2016-August/044127.html" target="_blank">https://lists.osgeo.org/<wbr>pipermail/qgis-developer/2016-<wbr>August/044127.html</a><br>
<br>
Denis<br>
<br>
<br>
</font></font><div><div class="h5"><br>
<div>On 09/05/2016 04:39 AM, Mathieu
Pellerin wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">Greetings,<br>
<br>
While testing QGIS compiled against Qt5 5.6.1 (the version that
will be offered in Ubuntu's next release in a month or so), I
ran into a rounding issue, whereas the round() expression engine
function simply fails to round values to the stated number of
decimals.<br>
<br>
As seen in this screenshot[1], using this expression "round(
0.972743..., 2 )" to round the double value to two decimals
returns 0.96999999999997. <br>
<br>
Nyall says the issue has been fixed in Qt5 5.7. For Qt5 <
5.7, is there a contingency plan for this problem? Could we get
distributions to include a fix in their 5.6.x packages (if
that’s possible)?<br>
<br>
Math<br>
<br>
[1] <a href="http://i.imgur.com/7v2Z24Z.png" target="_blank">http://i.imgur.com/7v2Z24Z.png</a><br>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>______________________________<wbr>_________________
Qgis-developer mailing list
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a></pre>
</blockquote>
<br>
</div>
</blockquote></div><br></div>