summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndre Hartmann <aha_1980@gmx.de>2018-06-16 22:20:29 +0200
committerAndré Hartmann <aha_1980@gmx.de>2018-06-22 10:59:31 +0000
commit95b41777bb013e0841044a617706fab452e297cd (patch)
tree3fe65c09360db6e064ba540db24e611f77cfe9ae /src
parentd640dbf730b392640d5497a789e95fa7d88f99fb (diff)
QLocale/QString/QByteArray: Use nullptr in documentation
While at it, fix some more issues in the sentences to harmonize the description between the different classes. Change-Id: Iee1c3ffe6fd71e82504bfb003d927c4db3b2a065 Reviewed-by: Martin Smith <martin.smith@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qbytearray.cpp40
-rw-r--r--src/corelib/tools/qlocale.cpp96
-rw-r--r--src/corelib/tools/qstring.cpp82
3 files changed, 110 insertions, 108 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 7c601e1336..424420204a 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -3671,8 +3671,8 @@ T toIntegral_helper(const char *data, bool *ok, int base)
Returns 0 if the conversion fails.
- If \a ok is not 0: if a conversion error occurs, *\a{ok} is set to
- false; otherwise *\a{ok} is set to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
\note The conversion of the number is performed in the default C locale,
irrespective of the user's locale.
@@ -3697,8 +3697,8 @@ qlonglong QByteArray::toLongLong(bool *ok, int base) const
Returns 0 if the conversion fails.
- If \a ok is not 0: if a conversion error occurs, *\a{ok} is set to
- false; otherwise *\a{ok} is set to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
\note The conversion of the number is performed in the default C locale,
irrespective of the user's locale.
@@ -3722,8 +3722,8 @@ qulonglong QByteArray::toULongLong(bool *ok, int base) const
Returns 0 if the conversion fails.
- If \a ok is not 0: if a conversion error occurs, *\a{ok} is set to
- false; otherwise *\a{ok} is set to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
\snippet code/src_corelib_tools_qbytearray.cpp 36
@@ -3749,8 +3749,8 @@ int QByteArray::toInt(bool *ok, int base) const
Returns 0 if the conversion fails.
- If \a ok is not 0: if a conversion error occurs, *\a{ok} is set to
- false; otherwise *\a{ok} is set to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
\note The conversion of the number is performed in the default C locale,
irrespective of the user's locale.
@@ -3776,8 +3776,8 @@ uint QByteArray::toUInt(bool *ok, int base) const
Returns 0 if the conversion fails.
- If \a ok is not 0: if a conversion error occurs, *\a{ok} is set to
- false; otherwise *\a{ok} is set to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
\snippet code/src_corelib_tools_qbytearray.cpp 37
@@ -3804,8 +3804,8 @@ long QByteArray::toLong(bool *ok, int base) const
Returns 0 if the conversion fails.
- If \a ok is not 0: if a conversion error occurs, *\a{ok} is set to
- false; otherwise *\a{ok} is set to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
\note The conversion of the number is performed in the default C locale,
irrespective of the user's locale.
@@ -3828,8 +3828,8 @@ ulong QByteArray::toULong(bool *ok, int base) const
Returns 0 if the conversion fails.
- If \a ok is not 0: if a conversion error occurs, *\a{ok} is set to
- false; otherwise *\a{ok} is set to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
\note The conversion of the number is performed in the default C locale,
irrespective of the user's locale.
@@ -3853,8 +3853,8 @@ short QByteArray::toShort(bool *ok, int base) const
Returns 0 if the conversion fails.
- If \a ok is not 0: if a conversion error occurs, *\a{ok} is set to
- false; otherwise *\a{ok} is set to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
\note The conversion of the number is performed in the default C locale,
irrespective of the user's locale.
@@ -3873,8 +3873,8 @@ ushort QByteArray::toUShort(bool *ok, int base) const
Returns 0.0 if the conversion fails.
- If \a ok is not 0: if a conversion error occurs, *\a{ok} is set to
- false; otherwise *\a{ok} is set to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
\snippet code/src_corelib_tools_qbytearray.cpp 38
@@ -3900,8 +3900,8 @@ double QByteArray::toDouble(bool *ok) const
Returns 0.0 if the conversion fails.
- If \a ok is not 0: if a conversion error occurs, *\a{ok} is set to
- false; otherwise *\a{ok} is set to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
\note The conversion of the number is performed in the default C locale,
irrespective of the user's locale.
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 04a43f7477..00a2c05c35 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -1247,8 +1247,8 @@ QString QLocale::scriptToString(QLocale::Script script)
If the conversion fails the function returns 0.
- If \a ok is not 0, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1265,8 +1265,8 @@ short QLocale::toShort(const QString &s, bool *ok) const
If the conversion fails the function returns 0.
- If \a ok is not 0, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1283,8 +1283,8 @@ ushort QLocale::toUShort(const QString &s, bool *ok) const
If the conversion fails the function returns 0.
- If \a ok is not 0, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1301,8 +1301,8 @@ int QLocale::toInt(const QString &s, bool *ok) const
If the conversion fails the function returns 0.
- If \a ok is not 0, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1319,8 +1319,8 @@ uint QLocale::toUInt(const QString &s, bool *ok) const
If the conversion fails the function returns 0.
- If \a ok is not 0, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1339,8 +1339,8 @@ qlonglong QLocale::toLongLong(const QString &s, bool *ok) const
If the conversion fails the function returns 0.
- If \a ok is not 0, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1356,8 +1356,8 @@ qulonglong QLocale::toULongLong(const QString &s, bool *ok) const
Returns the float represented by the localized string \a s, or 0.0
if the conversion failed.
- If \a ok is not 0, reports failure by setting
- *ok to false and success by setting *ok to true.
+ If \a ok is not \c 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.
@@ -1376,8 +1376,8 @@ float QLocale::toFloat(const QString &s, bool *ok) const
Returns the double represented by the localized string \a s, or
0.0 if the conversion failed.
- If \a ok is not 0, reports failure by setting
- *ok to false and success by setting *ok to true.
+ If \a ok is not \c 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.
@@ -1402,8 +1402,8 @@ double QLocale::toDouble(const QString &s, bool *ok) const
If the conversion fails the function returns 0.
- If \a ok is not null, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1422,8 +1422,8 @@ short QLocale::toShort(const QStringRef &s, bool *ok) const
If the conversion fails the function returns 0.
- If \a ok is not null, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1442,8 +1442,8 @@ ushort QLocale::toUShort(const QStringRef &s, bool *ok) const
If the conversion fails the function returns 0.
- If \a ok is not null, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1462,8 +1462,8 @@ int QLocale::toInt(const QStringRef &s, bool *ok) const
If the conversion fails the function returns 0.
- If \a ok is not null, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1482,8 +1482,8 @@ uint QLocale::toUInt(const QStringRef &s, bool *ok) const
If the conversion fails the function returns 0.
- If \a ok is not null, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1504,8 +1504,8 @@ qlonglong QLocale::toLongLong(const QStringRef &s, bool *ok) const
If the conversion fails the function returns 0.
- If \a ok is not null, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1523,8 +1523,8 @@ qulonglong QLocale::toULongLong(const QStringRef &s, bool *ok) const
Returns the float represented by the localized string \a s, or 0.0
if the conversion failed.
- If \a ok is not null, reports failure by setting
- *ok to false and success by setting *ok to true.
+ If \a ok is not \c 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.
@@ -1545,8 +1545,8 @@ float QLocale::toFloat(const QStringRef &s, bool *ok) const
Returns the double represented by the localized string \a s, or
0.0 if the conversion failed.
- If \a ok is not null, reports failure by setting
- *ok to false and success by setting *ok to true.
+ If \a ok is not \c 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.
@@ -1574,8 +1574,8 @@ double QLocale::toDouble(const QStringRef &s, bool *ok) const
If the conversion fails, the function returns 0.
- If \a ok is not null, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1594,8 +1594,8 @@ short QLocale::toShort(QStringView s, bool *ok) const
If the conversion fails, the function returns 0.
- If \a ok is not null, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1614,8 +1614,8 @@ ushort QLocale::toUShort(QStringView s, bool *ok) const
If the conversion fails, the function returns 0.
- If \a ok is not null, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1634,8 +1634,8 @@ int QLocale::toInt(QStringView s, bool *ok) const
If the conversion fails, the function returns 0.
- If \a ok is not null, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1654,8 +1654,8 @@ uint QLocale::toUInt(QStringView s, bool *ok) const
If the conversion fails, the function returns 0.
- If \a ok is not null, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1676,8 +1676,8 @@ qlonglong QLocale::toLongLong(QStringView s, bool *ok) const
If the conversion fails, the function returns 0.
- If \a ok is not null, failure is reported by setting *ok to false, and
- success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1695,8 +1695,8 @@ qulonglong QLocale::toULongLong(QStringView s, bool *ok) const
Returns the float represented by the localized string \a s, or 0.0
if the conversion failed.
- If \a ok is not null, reports failure by setting
- *ok to false and success by setting *ok to true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1714,8 +1714,8 @@ float QLocale::toFloat(QStringView s, bool *ok) const
Returns the double represented by the localized string \a s, or
0.0 if the conversion failed.
- If \a ok is not null, reports failure by setting
- *ok to false and success by setting *ok to true.
+ If \a ok is not \c 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
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index a737d70a9c..a83d8833cd 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -6907,8 +6907,8 @@ QString QString::vasprintf(const char *cformat, va_list ap)
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6949,8 +6949,8 @@ qlonglong QString::toIntegral_helper(const QChar *data, int len, bool *ok, int b
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -6993,8 +6993,8 @@ qulonglong QString::toIntegral_helper(const QChar *data, uint len, bool *ok, int
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -7024,8 +7024,8 @@ long QString::toLong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -7054,8 +7054,8 @@ ulong QString::toULong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -7083,8 +7083,8 @@ int QString::toInt(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -7112,8 +7112,8 @@ uint QString::toUInt(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -7141,8 +7141,8 @@ short QString::toShort(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -7171,8 +7171,8 @@ ushort QString::toUShort(bool *ok, int base) const
Returns 0.0 if the conversion fails.
- If a conversion error occurs, \c{*}\a{ok} is set to \c false;
- otherwise \c{*}\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
\snippet qstring/main.cpp 66
@@ -7209,8 +7209,8 @@ double QString::toDouble(bool *ok) const
Returns 0.0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
\warning The QString content may only contain valid numerical characters
which includes the plus/minus sign, the characters g and e used in scientific
@@ -11590,8 +11590,8 @@ QStringRef QStringRef::trimmed() const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -11615,8 +11615,8 @@ qint64 QStringRef::toLongLong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -11642,8 +11642,8 @@ quint64 QStringRef::toULongLong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -11669,8 +11669,8 @@ long QStringRef::toLong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -11695,8 +11695,8 @@ ulong QStringRef::toULong(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -11720,8 +11720,8 @@ int QStringRef::toInt(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -11745,8 +11745,8 @@ uint QStringRef::toUInt(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -11770,8 +11770,8 @@ short QStringRef::toShort(bool *ok, int base) const
base, which is 10 by default and must be between 2 and 36, or 0.
Returns 0 if the conversion fails.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
If \a base is 0, the C language convention is used: If the string
begins with "0x", base 16 is used; if the string begins with "0",
@@ -11796,8 +11796,8 @@ ushort QStringRef::toUShort(bool *ok, int base) const
Returns 0.0 if the conversion fails.
- If a conversion error occurs, \c{*}\a{ok} is set to \c false;
- otherwise \c{*}\a{ok} is set to \c true.
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
The string conversion will always happen in the 'C' locale. For locale
dependent conversion use QLocale::toDouble()
@@ -11819,8 +11819,10 @@ double QStringRef::toDouble(bool *ok) const
/*!
Returns the string converted to a \c float value.
- If a conversion error occurs, *\a{ok} is set to \c false; otherwise
- *\a{ok} is set to \c true. Returns 0.0 if the conversion fails.
+ Returns 0.0 if the conversion fails.
+
+ If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ to \c false, and success by setting *\a{ok} to \c true.
The string conversion will always happen in the 'C' locale. For locale
dependent conversion use QLocale::toFloat()