From 2c6c044500a92a3a125ce4b5d936992bdf02a487 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 24 Nov 2017 13:27:52 +0100 Subject: [PATCH] Fix qdoc warnings for 5.10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/corelib/global/qrandom.cpp:915: warning: Cannot find 'bounded(...)' in '\fn' qreal QRandomGenerator::bounded(qreal highest) src/corelib/tools/qstring.cpp:774: warning: Command '\snippet (//! [qCompareStrings-QSV-QSV])' failed at end of file 'qstring/main.cpp' src/corelib/tools/qstring.cpp:5281: warning: Cannot find 'qTrimmed(...)' in '\fn' QStringView qTrimmed(QStringView s) src/corelib/tools/qstring.cpp:5281: warning: Cannot find 'qTrimmed(...)' in '\fn' QLatin1String qTrimmed(QLatin1String s) src/corelib/global/qrandom.h:171: warning: No documentation for 'QRandomGenerator::System' src/corelib/global/qrandom.h:105: warning: No documentation for 'QRandomGenerator::bounded(double highest)' src/corelib/global/qrandom.h:84: warning: No documentation for 'QRandomGenerator::generate64()' src/corelib/global/qrandom.h:77: warning: No documentation for 'QRandomGenerator::generate()' src/corelib/global/qrandom.cpp:799: warning: No such parameter 'sseq' in QRandomGenerator::seed() src/corelib/global/qrandom.cpp:1096: warning: Can't link to 'operator()()' src/corelib/tools/qstring.cpp:8982: warning: Can't link to 'qStartsWith()' src/corelib/tools/qstring.cpp:9203: warning: Can't link to 'qTrimmed()' src/corelib/tools/qstring.cpp:4798: warning: Can't link to 'qConvertToLatin1()' src/corelib/tools/qstring.cpp:4825: warning: Can't link to 'qConvertToLocal8Bit()' src/corelib/tools/qstring.cpp:4928: warning: Can't link to 'qConvertToUcs4()' src/corelib/tools/qstring.cpp:4884: warning: Can't link to 'qConvertToUtf8()' Change-Id: I5c7c89b230d3d1de8a679c10833319a470a44e80 Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Thiago Macieira --- src/corelib/global/qrandom.cpp | 33 +++++++++++++++++++++++++------ src/corelib/tools/qstring.cpp | 18 +++++++---------- src/corelib/tools/qstringview.cpp | 8 +++----- 3 files changed, 37 insertions(+), 22 deletions(-) diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp index 72ac8d332b..b6e8e03909 100644 --- a/src/corelib/global/qrandom.cpp +++ b/src/corelib/global/qrandom.cpp @@ -655,6 +655,11 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel \sa QRandomGenerator64, qrand() */ +/*! + \enum QRandomGenerator::System + \internal +*/ + /*! \fn QRandomGenerator::QRandomGenerator(quint32 seedValue) @@ -694,7 +699,7 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel */ /*! - \fn QRandomGenerator::QRandomGenerator(const quint32 *begin, const quin32 *end) + \fn QRandomGenerator::QRandomGenerator(const quint32 *begin, const quint32 *end) \overload Initializes this QRandomGenerator object with the values found in the range @@ -762,7 +767,7 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel A typedef to the type that operator()() returns. That is, quint32. - \sa operator()() + \sa {QRandomGenerator::operator()}{operator()()} */ /*! @@ -773,6 +778,22 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel \sa generate(), generate64() */ +/*! + \fn quint32 QRandomGenerator::generate() + + Generates a 32-bit random quantity and returns it. + + \sa {QRandomGenerator::operator()}{operator()()}, generate64() + */ + +/*! + \fn quint64 QRandomGenerator::generate64() + + Generates a 64-bit random quantity and returns it. + + \sa {QRandomGenerator::operator()}{operator()()}, generate() + */ + /*! \fn result_type QRandomGenerator::min() @@ -800,7 +821,7 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel \fn void QRandomGenerator::seed(std::seed_seq &seed) \overload - Reseeds this object using the seed sequence \a sseq as the seed. + Reseeds this object using the seed sequence \a seed as the seed. */ /*! @@ -913,9 +934,9 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel */ /*! - \fn qreal QRandomGenerator::bounded(qreal highest) + \fn double QRandomGenerator::bounded(double highest) - Generates one random qreal in the range between 0 (inclusive) and \a + Generates one random double in the range between 0 (inclusive) and \a highest (exclusive). This function is equivalent to and is implemented as: \code @@ -1098,7 +1119,7 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel A typedef to the type that operator()() returns. That is, quint64. - \sa operator()() + \sa {QRandomGenerator64::operator()}{operator()()} */ /*! diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index c10987a5fe..c01052e152 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -769,8 +769,6 @@ static int qt_compare_strings(QLatin1String lhs, QLatin1String rhs, Qt::CaseSens Case-sensitive comparison is based exclusively on the numeric Unicode values of the characters and is very fast, but is not what a human would expect. Consider sorting user-visible strings with QString::localeAwareCompare(). - - \snippet qstring/main.cpp qCompareStrings-QSV-QSV */ int QtPrivate::compareStrings(QStringView lhs, QStringView rhs, Qt::CaseSensitivity cs) Q_DECL_NOTHROW { @@ -4837,7 +4835,7 @@ static QByteArray qt_convert_to_local_8bit(QStringView string); locale, the returned byte array is undefined. Those characters may be suppressed or replaced by another. - \sa fromLocal8Bit(), toLatin1(), toUtf8(), QTextCodec, qConvertToLocal8Bit() + \sa fromLocal8Bit(), toLatin1(), toUtf8(), QTextCodec */ QByteArray QString::toLocal8Bit_helper(const QChar *data, int size) @@ -4871,8 +4869,7 @@ static QByteArray qt_convert_to_local_8bit(QStringView string) The behavior is undefined if \a string contains characters not supported by the locale's 8-bit encoding. - \sa QString::toLocal8Bit(), QStringView::toLocal8Bit(), QtPrivate::vonvertToLatin1(), - QtPrivate::convertToUtf8(), QtPrivate::convertToUcs4() + \sa QString::toLocal8Bit(), QStringView::toLocal8Bit() */ QByteArray QtPrivate::convertToLocal8Bit(QStringView string) { @@ -4915,8 +4912,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 QStringView. - \sa QString::toUtf8(), QStringView::toUtf8(), QtPrivate::convertToLatin1(), - QtPrivate::convertToLocal8Bit(), QtPrivate::convertToUcs4() + \sa QString::toUtf8(), QStringView::toUtf8() */ QByteArray QtPrivate::convertToUtf8(QStringView string) { @@ -5279,8 +5275,8 @@ namespace { } /*! - \fn QStringView qTrimmed(QStringView s) - \fn QLatin1String qTrimmed(QLatin1String s) + \fn QStringView QtPrivate::trimmed(QStringView s) + \fn QLatin1String QtPrivate::trimmed(QLatin1String s) \internal \relates QStringView \since 5.10 @@ -8996,7 +8992,7 @@ QString &QString::setRawData(const QChar *unicode, int size) If \a cs is Qt::CaseSensitive (the default), the search is case-sensitive; otherwise the search is case-insensitive. - \sa endsWith(), qStartsWith() + \sa endsWith() */ /*! @@ -9016,7 +9012,7 @@ QString &QString::setRawData(const QChar *unicode, int size) If \a cs is Qt::CaseSensitive (the default), the search is case-sensitive; otherwise the search is case-insensitive. - \sa startsWith(), qEndsWith() + \sa startsWith() */ /*! diff --git a/src/corelib/tools/qstringview.cpp b/src/corelib/tools/qstringview.cpp index 8eefc6d814..f510f44ce7 100644 --- a/src/corelib/tools/qstringview.cpp +++ b/src/corelib/tools/qstringview.cpp @@ -672,8 +672,6 @@ QT_BEGIN_NAMESPACE Whitespace means any character for which QChar::isSpace() returns \c true. This includes the ASCII characters '\\t', '\\n', '\\v', '\\f', '\\r', and ' '. - - \sa qTrimmed() */ /*! @@ -689,7 +687,7 @@ QT_BEGIN_NAMESPACE If \a cs is Qt::CaseSensitive (the default), the search is case-sensitive; otherwise the search is case-insensitive. - \sa endsWith(), qStartsWith() + \sa endsWith() */ /*! @@ -705,7 +703,7 @@ QT_BEGIN_NAMESPACE If \a cs is Qt::CaseSensitive (the default), the search is case-sensitive; otherwise the search is case-insensitive. - \sa startsWith(), qEndsWith() + \sa startsWith() */ /*! @@ -730,7 +728,7 @@ QT_BEGIN_NAMESPACE The behavior is undefined if the string contains characters not supported by the locale's 8-bit encoding. - \sa toLatin1(), toUtf8(), QTextCodec, qConvertToLocal8Bit() + \sa toLatin1(), toUtf8(), QTextCodec */ /*!