OSDN Git Service

use correct precision when converting float/double values in QDomElement
authorIvailo Monev <xakepa10@gmail.com>
Mon, 14 Dec 2020 18:23:01 +0000 (18:23 +0000)
committerIvailo Monev <xakepa10@gmail.com>
Mon, 14 Dec 2020 18:23:01 +0000 (18:23 +0000)
commitb10bbfeeecf2f368d2e869e5118982917a604572
treec5601d58791e7fe02ca5a39bdc9f671a6f9091e3
parentf371bee15e2f3f422ba73d08e48ba10ce15481e5
use correct precision when converting float/double values in QDomElement

since exponent is allowed in XML according to the spec at
https://www.w3.org/TR/xmlschema-2/ I prefer to use that but the limitation
of std::strtod() is there - precision is lost when QString::toDouble() is
used to convert the attribute back to double

upstream commits:
https://github.com/qt/qtbase/commit/8c883c8da32faf1245d257f1fc1fb39fb2b63efc
https://github.com/qt/qtbase/commit/d7cb21ac085117f879a8aa1d7727b2ca52d3353d

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/xml/dom/qdom.cpp