From 9a74cbf47386a861b44900cda2c5a00b4ffd42d8 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Thu, 1 Feb 2018 21:47:42 +0100 Subject: QString: Wrap extra-long comment line Change-Id: I77c95e99fd23eb914d7e86ee003d7f487c57f0f0 Reviewed-by: Martin Smith --- src/corelib/tools/qstring.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 30f8948eec..9926244497 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -6951,7 +6951,10 @@ ushort QString::toUShort(bool *ok, int base) const \snippet qstring/main.cpp 66 - \warning The QString content may only contain valid numerical characters which includes the plus/minus sign, the characters g and e used in scientific notation, and the decimal point. Including the unit or additional characters leads to a conversion error. + \warning The QString content may only contain valid numerical characters + which includes the plus/minus sign, the characters g and e used in scientific + notation, and the decimal point. Including the unit or additional characters + leads to a conversion error. \snippet qstring/main.cpp 67 -- cgit v1.2.3 From 6197df32ec3449ec141bcd9fa4fe47da4cc761e7 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Thu, 1 Feb 2018 21:37:56 +0100 Subject: QString: Add whitespace handling note to number conversion functions Copied from QLocale::toFloat and companions. Change-Id: Ic3a13a87cfc1ce34de9dd7d7e7b303ef103c384a Reviewed-by: Thiago Macieira --- src/corelib/tools/qstring.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 9926244497..1ef9f5a3c5 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -6712,6 +6712,8 @@ QString QString::vasprintf(const char *cformat, va_list ap) \snippet qstring/main.cpp 74 + This function ignores leading and trailing whitespace. + \sa number(), toULongLong(), toInt(), QLocale::toLongLong() */ @@ -6752,6 +6754,8 @@ qlonglong QString::toIntegral_helper(const QChar *data, int len, bool *ok, int b \snippet qstring/main.cpp 79 + This function ignores leading and trailing whitespace. + \sa number(), toLongLong(), QLocale::toULongLong() */ @@ -6794,6 +6798,8 @@ qulonglong QString::toIntegral_helper(const QChar *data, uint len, bool *ok, int \snippet qstring/main.cpp 73 + This function ignores leading and trailing whitespace. + \sa number(), toULong(), toInt(), QLocale::toInt() */ @@ -6823,6 +6829,8 @@ long QString::toLong(bool *ok, int base) const \snippet qstring/main.cpp 78 + This function ignores leading and trailing whitespace. + \sa number(), QLocale::toUInt() */ @@ -6851,6 +6859,8 @@ ulong QString::toULong(bool *ok, int base) const \snippet qstring/main.cpp 72 + This function ignores leading and trailing whitespace. + \sa number(), toUInt(), toDouble(), QLocale::toInt() */ @@ -6878,6 +6888,8 @@ int QString::toInt(bool *ok, int base) const \snippet qstring/main.cpp 77 + This function ignores leading and trailing whitespace. + \sa number(), toInt(), QLocale::toUInt() */ @@ -6905,6 +6917,8 @@ uint QString::toUInt(bool *ok, int base) const \snippet qstring/main.cpp 76 + This function ignores leading and trailing whitespace. + \sa number(), toUShort(), toInt(), QLocale::toShort() */ @@ -6932,6 +6946,8 @@ short QString::toShort(bool *ok, int base) const \snippet qstring/main.cpp 80 + This function ignores leading and trailing whitespace. + \sa number(), toShort(), QLocale::toUShort() */ @@ -6969,6 +6985,8 @@ ushort QString::toUShort(bool *ok, int base) const \snippet qstring/main.cpp 69 + This function ignores leading and trailing whitespace. + \sa number(), QLocale::setDefault(), QLocale::toDouble(), trimmed() */ @@ -6983,6 +7001,8 @@ double QString::toDouble(bool *ok) const 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. + This function ignores leading and trailing whitespace. + The string conversion will always happen in the 'C' locale. For locale dependent conversion use QLocale::toFloat() @@ -6990,6 +7010,8 @@ double QString::toDouble(bool *ok) const \snippet qstring/main.cpp 71 + This function ignores leading and trailing whitespace. + \sa number(), toDouble(), toInt(), QLocale::toFloat() */ -- cgit v1.2.3