summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@qt.io>2018-01-04 13:42:11 +0100
committerMartin Smith <martin.smith@qt.io>2018-01-05 20:22:01 +0000
commit81e4d039a914c00e740e2faf841b1324405fd586 (patch)
treead3a94168f54e1b0781a974aa0029619eac25cb7
parent4d3c55aa31c40aad8c5eb1a98bc42787d3fe916a (diff)
doc: Correct remaining qdoc warnings in qstring.cpp
Added missing template clause to \fn commands required by clang-qdoc. Removed several obsolete \sa targets. Added a few missing return types to \fn commands. Also changed a } to ] in a \fn command in qrandom.cpp. Change-Id: I0f004a1e57507ff5fb035e822ca8b1baa7faad9b Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
-rw-r--r--src/corelib/global/qrandom.cpp2
-rw-r--r--src/corelib/tools/qstring.cpp30
2 files changed, 18 insertions, 14 deletions
diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp
index b5d89ab094..6c26d4682d 100644
--- a/src/corelib/global/qrandom.cpp
+++ b/src/corelib/global/qrandom.cpp
@@ -894,7 +894,7 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel
*/
/*!
- \fn template <typename UInt, size_t N> void QRandomGenerator::fillRange(UInt (&buffer)[N})
+ \fn template <typename UInt, size_t N> void QRandomGenerator::fillRange(UInt (&buffer)[N])
Generates \c N 32- or 64-bit quantities (depending on the type \c UInt) and
stores them in the \a buffer array. This is the most efficient way to
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index e6b4cc4b4f..5eeaa2a2a8 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -4574,7 +4574,7 @@ QString QString::mid(int position, int n) const
}
/*!
- \fn QString::chopped(int len) const
+ \fn QString QString::chopped(int len) const
\since 5.10
Returns a substring that contains the size() - \a len leftmost characters
@@ -4802,7 +4802,7 @@ QByteArray QString::toLatin1_helper_inplace(QString &s)
characters. Those characters may be suppressed or replaced with a
question mark.
- \sa fromLatin1(), toUtf8(), toLocal8Bit(), QTextCodec, qConvertToLatin1()
+ \sa fromLatin1(), toUtf8(), toLocal8Bit(), QTextCodec
*/
/*!
@@ -4863,8 +4863,7 @@ static QByteArray qt_convert_to_local_8bit(QStringView string)
Returns a local 8-bit representation of \a string as a QByteArray.
QTextCodec::codecForLocale() is used to perform the conversion from
- Unicode. If the locale's encoding could not be determined, this function
- does the same as qConvertToLatin1().
+ Unicode.
The behavior is undefined if \a string contains characters not
supported by the locale's 8-bit encoding.
@@ -4886,7 +4885,7 @@ static QByteArray qt_convert_to_utf8(QStringView str);
UTF-8 is a Unicode codec and can represent all characters in a Unicode
string like QString.
- \sa fromUtf8(), toLatin1(), toLocal8Bit(), QTextCodec, qConvertToUtf8()
+ \sa fromUtf8(), toLatin1(), toLocal8Bit(), QTextCodec
*/
QByteArray QString::toUtf8_helper(const QString &str)
@@ -4933,7 +4932,7 @@ static QVector<uint> qt_convert_to_ucs4(QStringView string);
The returned vector is not NUL terminated.
- \sa fromUtf8(), toUtf8(), toLatin1(), toLocal8Bit(), QTextCodec, fromUcs4(), toWCharArray(), qConvertToUcs4()
+ \sa fromUtf8(), toUtf8(), toLatin1(), toLocal8Bit(), QTextCodec, fromUcs4(), toWCharArray()
*/
QVector<uint> QString::toUcs4() const
{
@@ -6438,7 +6437,7 @@ static LengthMod parse_length_modifier(const char * &c) Q_DECL_NOTHROW
}
/*!
- \fn QString::vasprintf(const char *cformat, va_list ap)
+ \fn QString QString::vasprintf(const char *cformat, va_list ap)
\since 5.5
Equivalent method to asprintf(), but takes a va_list \a ap
@@ -8800,6 +8799,13 @@ QString &QString::setRawData(const QChar *unicode, int size)
*/
/*!
+ \typedef QLatin1String::const_reference
+ \since 5.11
+
+ Alias for \c{reference}. Provided for compatibility with the STL.
+*/
+
+/*!
\typedef QLatin1String::iterator
\since 5.10
@@ -9213,8 +9219,6 @@ QString &QString::setRawData(const QChar *unicode, int size)
Whitespace means any character for which QChar::isSpace() returns
\c true. This includes the ASCII characters '\\t', '\\n', '\\v',
'\\f', '\\r', and ' '.
-
- \sa qTrimmed()
*/
/*! \fn bool QLatin1String::operator==(const QString &other) const
@@ -10456,7 +10460,7 @@ QStringRef QString::rightRef(int n) const
}
/*!
- \fn QStringRef::mid(int position, int n = -1) const
+ \fn QStringRef QStringRef::mid(int position, int n = -1) const
\since 5.2
Returns a substring reference to \a n characters of this string,
@@ -10490,7 +10494,7 @@ QStringRef QStringRef::mid(int pos, int n) const
}
/*!
- \fn QStringRef::chopped(int len) const
+ \fn QStringRef QStringRef::chopped(int len) const
\since 5.10
Returns a substring reference to the size() - \a len leftmost characters
@@ -11120,7 +11124,7 @@ static inline bool qt_starts_with(QStringView haystack, QChar needle, Qt::CaseSe
\since 5.10
\fn bool QtPrivate::startsWith(QStringView haystack, QLatin1String needle, Qt::CaseSensitivity cs)
\since 5.10
- \fn bool QtPrivate::startsWith(QLatin1String haystack, QStringview needle, Qt::CaseSensitivity cs)
+ \fn bool QtPrivate::startsWith(QLatin1String haystack, QStringView needle, Qt::CaseSensitivity cs)
\since 5.10
\fn bool QtPrivate::startsWith(QLatin1String haystack, QLatin1String needle, Qt::CaseSensitivity cs)
\since 5.10
@@ -11193,7 +11197,7 @@ static inline bool qt_ends_with(QStringView haystack, QChar needle, Qt::CaseSens
\since 5.10
\fn bool QtPrivate::endsWith(QStringView haystack, QLatin1String needle, Qt::CaseSensitivity cs)
\since 5.10
- \fn bool QtPrivate::endsWith(QLatin1String haystack, QStringview needle, Qt::CaseSensitivity cs)
+ \fn bool QtPrivate::endsWith(QLatin1String haystack, QStringView needle, Qt::CaseSensitivity cs)
\since 5.10
\fn bool QtPrivate::endsWith(QLatin1String haystack, QLatin1String needle, Qt::CaseSensitivity cs)
\since 5.10