diff options
author | Andre Hartmann <aha_1980@gmx.de> | 2018-06-16 22:19:20 +0200 |
---|---|---|
committer | André Hartmann <aha_1980@gmx.de> | 2018-06-22 06:33:31 +0000 |
commit | db3c1cb230e1f2ca9053590d72ecb22a2582c439 (patch) | |
tree | 3a15b2d2a6f3e465a26fb371b5895d53b78ab6f3 | |
parent | f731ed9bcf7c359a3387b5bb2fb491c8ef96fae3 (diff) |
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 <thiago.macieira@intel.com>
-rw-r--r-- | src/corelib/tools/qlocale.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
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 |