From db3c1cb230e1f2ca9053590d72ecb22a2582c439 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Sat, 16 Jun 2018 22:19:20 +0200 Subject: QLocale: Remove misleading link to QString::toDouble() conversion While at it, add the comment to the toFloat() functions also. Task-number: QTBUG-55232 Change-Id: I21c06363946f35fb3d89a51e4f75be392b57c0a9 Reviewed-by: Thiago Macieira --- src/corelib/tools/qlocale.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/corelib/tools/qlocale.cpp') diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 09b148ea9e..04a43f7477 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -1359,6 +1359,9 @@ qulonglong QLocale::toULongLong(const QString &s, bool *ok) const If \a ok is not 0, reports failure by setting *ok to false and success by setting *ok to true. + This function does not fall back to the 'C' locale if the string + cannot be interpreted in this locale. + This function ignores leading and trailing whitespace. \sa toDouble(), toInt(), toString() @@ -1376,9 +1379,8 @@ float QLocale::toFloat(const QString &s, bool *ok) const If \a ok is not 0, reports failure by setting *ok to false and success by setting *ok to true. - Unlike QString::toDouble(), this function does not use - the 'C' locale if the string cannot be interpreted in this - locale. + This function does not fall back to the 'C' locale if the string + cannot be interpreted in this locale. \snippet code/src_corelib_tools_qlocale.cpp 3 @@ -1524,6 +1526,9 @@ qulonglong QLocale::toULongLong(const QStringRef &s, bool *ok) const If \a ok is not null, reports failure by setting *ok to false and success by setting *ok to true. + This function does not fall back to the 'C' locale if the string + cannot be interpreted in this locale. + This function ignores leading and trailing whitespace. \sa toDouble(), toInt(), toString() @@ -1543,9 +1548,8 @@ float QLocale::toFloat(const QStringRef &s, bool *ok) const If \a ok is not null, reports failure by setting *ok to false and success by setting *ok to true. - Unlike QString::toDouble(), this function does not fall back to - the "C" locale if the string cannot be interpreted in this - locale. + This function does not fall back to the 'C' locale if the string + cannot be interpreted in this locale. \snippet code/src_corelib_tools_qlocale.cpp 3 -- cgit v1.2.3