diff options
Diffstat (limited to 'src/corelib/tools/qlocale.cpp')
-rw-r--r-- | src/corelib/tools/qlocale.cpp | 112 |
1 files changed, 58 insertions, 54 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 9c1e78ee61..e70630eb12 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -1262,8 +1262,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. @@ -1280,8 +1280,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. @@ -1298,8 +1298,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. @@ -1316,8 +1316,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. @@ -1334,8 +1334,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. @@ -1354,8 +1354,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. @@ -1371,8 +1371,11 @@ 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. This function ignores leading and trailing whitespace. @@ -1388,12 +1391,11 @@ 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. - 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 @@ -1415,8 +1417,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. @@ -1435,8 +1437,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. @@ -1455,8 +1457,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. @@ -1475,8 +1477,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. @@ -1495,8 +1497,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. @@ -1517,8 +1519,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. @@ -1536,8 +1538,11 @@ 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. This function ignores leading and trailing whitespace. @@ -1555,12 +1560,11 @@ 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. - 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 @@ -1585,8 +1589,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. @@ -1605,8 +1609,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. @@ -1625,8 +1629,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. @@ -1645,8 +1649,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. @@ -1665,8 +1669,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. @@ -1687,8 +1691,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. @@ -1706,8 +1710,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. @@ -1725,8 +1729,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 |