From 8c2ca33073f20e1fe552bd8b5f663aec5b8a634d Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 15 Oct 2015 15:40:26 +0200 Subject: Replace qdtoa and qstrtod implementation by a 3rdparty library This also fixes the underlying cause of QTBUG-44039 and QTBUG-43885. You can choose between system, qt, and no libdouble-conversion support. If you choose "no", snprintf_l and sscanf_l will be used. By default, system double conversion is used if the system provides a double-conversion library. Otherwise the bundled libdouble-conversion is built. sscanf_l and snprintf_l are not used by default as the planned "shortest" conversion mode to produce the shortest possible string will give less precise results when implemented with snprintf_l. Change-Id: I8ca08a0fca5c54cf7009e48e771385614f6aa031 Reviewed-by: Simon Hausmann --- src/corelib/tools/tools.pri | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/corelib/tools/tools.pri') diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri index c43fd761d8..d8c704f304 100644 --- a/src/corelib/tools/tools.pri +++ b/src/corelib/tools/tools.pri @@ -24,6 +24,7 @@ HEADERS += \ tools/qdatetime.h \ tools/qdatetime_p.h \ tools/qdatetimeparser_p.h \ + tools/qdoublescanprint_p.h \ tools/qeasingcurve.h \ tools/qfreelist_p.h \ tools/qhash.h \ @@ -202,6 +203,14 @@ INCLUDEPATH += ../3rdparty/md5 \ ../3rdparty/md4 \ ../3rdparty/sha3 +contains(QT_CONFIG, doubleconversion) { + include($$PWD/../../3rdparty/double-conversion/double-conversion.pri) +} else:contains(QT_CONFIG, system-doubleconversion) { + LIBS_PRIVATE += -ldouble-conversion +} else { + DEFINES += QT_NO_DOUBLECONVERSION +} + # Note: libm should be present by default becaue this is C++ !macx-icc:!vxworks:!haiku:unix:LIBS_PRIVATE += -lm -- cgit v1.2.3