summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qlocale.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-10-28 16:07:12 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2022-11-01 02:27:28 +0200
commitf6b1c875d944b0917c332a25449dfdfb571c277b (patch)
tree77a6ef3bb1b1fc382361dad914a10ca25a959104 /src/corelib/text/qlocale.cpp
parentfb4bc5fa262336504e0f28603658bb2572796ce5 (diff)
Remove some factually inaccurate notes from QLocale method docs
Three methods parsing strings as numbers claimed not to fall back on the C locale. In fact, the parsing is somewhat lenient and has long accepted the digits and signs of the C locale's representations, along with the U+2212 minus sign, regardless of locale. The phrasing also tacitly suggested the matching QString function did fall back to C locale; when, in fact, it (since 6.0) *exclusively* uses the C locale. So that was misleading, too. Change-Id: Ida3f2f23b834ced5150bea20d8716756afd48e91 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text/qlocale.cpp')
-rw-r--r--src/corelib/text/qlocale.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/corelib/text/qlocale.cpp b/src/corelib/text/qlocale.cpp
index 84956e2466..031ba74fac 100644
--- a/src/corelib/text/qlocale.cpp
+++ b/src/corelib/text/qlocale.cpp
@@ -1720,9 +1720,6 @@ QString QLocale::scriptToString(QLocale::Script script)
If \a ok is not \nullptr, failure is reported by setting *\a{ok}
to \c false, and success by setting *\a{ok} to \c 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()
@@ -1738,9 +1735,6 @@ QString QLocale::scriptToString(QLocale::Script script)
If \a ok is not \nullptr, failure is reported by setting *\a{ok}
to \c false, and success by setting *\a{ok} to \c true.
- This function does not fall back to the 'C' locale if the string
- cannot be interpreted in this locale.
-
\snippet code/src_corelib_text_qlocale.cpp 3
Notice that the last conversion returns 1234.0, because '.' is the
@@ -1942,10 +1936,6 @@ float QLocale::toFloat(QStringView s, bool *ok) const
If \a ok is not \nullptr, failure is reported by setting *\a{ok}
to \c false, and success by setting *\a{ok} to \c true.
- Unlike QString::toDouble(), this function does not fall back to
- the "C" locale if the string cannot be interpreted in this
- locale.
-
\snippet code/src_corelib_text_qlocale.cpp 3-qstringview
Notice that the last conversion returns 1234.0, because '.' is the