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/qlocale_tools_p.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/corelib/tools/qlocale_tools_p.h') diff --git a/src/corelib/tools/qlocale_tools_p.h b/src/corelib/tools/qlocale_tools_p.h index 516a9fd05b..840ae8f163 100644 --- a/src/corelib/tools/qlocale_tools_p.h +++ b/src/corelib/tools/qlocale_tools_p.h @@ -66,6 +66,10 @@ QT_BEGIN_NAMESPACE +double asciiToDouble(const char *num, int numLen, bool &ok, int &processed); +void doubleToAscii(double d, QLocaleData::DoubleForm form, int precision, char *buf, int bufSize, + bool &sign, int &length, int &decpt); + QString qulltoa(qulonglong l, int base, const QChar _zero); QString qlltoa(qlonglong l, int base, const QChar zero); Q_CORE_EXPORT QString qdtoa(qreal d, int *decpt, int *sign); @@ -97,8 +101,6 @@ inline bool isZero(double d) } } -Q_CORE_EXPORT char *qdtoa(double d, int mode, int ndigits, int *decpt, - int *sign, char **rve, char **digits_str); Q_CORE_EXPORT double qstrtod(const char *s00, char const **se, bool *ok); qlonglong qstrtoll(const char *nptr, const char **endptr, int base, bool *ok); qulonglong qstrtoull(const char *nptr, const char **endptr, int base, bool *ok); -- cgit v1.2.3