From 95b41777bb013e0841044a617706fab452e297cd Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Sat, 16 Jun 2018 22:20:29 +0200 Subject: 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 --- src/corelib/tools/qlocale.cpp | 96 +++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 48 deletions(-) (limited to 'src/corelib/tools/qlocale.cpp') 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 -- cgit v1.2.3