From 71477104eb0be31452664e22927beb909465ffcd Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 2 Jan 2020 12:31:27 +0100 Subject: Fix some qdoc warnings src/corelib/serialization/qjsonvalue.cpp:174: (qdoc) warning: No such parameter 'n' in QJsonValue::QJsonValue() ... examples/widgets/doc/src/icons.qdoc:584: (qdoc) warning: Command '\snippet (//! [24])' failed at end of file 'widgets/icons/mainwindow.cpp' src/corelib/text/qbytearray.cpp:5177: (qdoc) warning: clang found diagnostics parsing \fn QByteArray::FromBase64Result::operator QByteArray() const error: out-of-line definition of 'operator QByteArray' does not match any declaration in 'QByteArray::FromBase64Result' src/corelib/serialization/qjsonarray.cpp:178: (qdoc) warning: Overrides a previous doc src/corelib/serialization/qjsonarray.cpp:140: (qdoc) warning: (The previous doc is here) src/corelib/serialization/qjsonobject.cpp:1016: (qdoc) warning: clang found diagnostics parsing \fn QJsonValueRef QJsonObject::iterator::operator[](int j) const error: out-of-line definition of 'operator[]' does not match any declaration in 'QJsonObject::iterator' src/corelib/serialization/qjsonobject.cpp:1267: (qdoc) warning: clang found diagnostics parsing \fn QJsonValue QJsonObject::const_iterator::operator[](int j) const error: out-of-line definition of 'operator[]' does not match any declaration in 'QJsonObject::const_iterator' src/corelib/tools/qhash.cpp:2641: (qdoc) warning: Overrides a previous doc src/corelib/tools/qhash.cpp:1492: (qdoc) warning: (The previous doc is here) src/corelib/tools/qhash.cpp:2659: (qdoc) warning: Can't link to 'unit()' src/corelib/text/qchar.cpp:274: (qdoc) warning: Undocumented enum item 'Script_Sundanese' in QChar::Script src/corelib/text/qchar.cpp:274: (qdoc) warning: No such enum item 'Script_Sundaneseo' in QChar::Script src/network/ssl/qsslsocket.cpp:1514: (qdoc) warning: Can't link to 'QSslConfiguration::addDefaultCaCertificate()' src/widgets/widgets/qtabwidget.cpp:581: (qdoc) warning: Undocumented parameter 'visible' in QTabWidget::setTabVisible() Change-Id: I05c2a4884873850b684fa94036cd90db1a6e7726 Reviewed-by: Lars Knoll --- examples/widgets/widgets/icons/mainwindow.cpp | 2 +- src/corelib/serialization/qjsonarray.cpp | 12 ++++++------ src/corelib/serialization/qjsonobject.cpp | 4 ++-- src/corelib/serialization/qjsonvalue.cpp | 6 +++--- src/corelib/text/qbytearray.cpp | 13 +++++++------ src/corelib/text/qchar.cpp | 2 +- src/corelib/tools/qhash.cpp | 4 ++-- src/network/ssl/qsslsocket.cpp | 2 +- src/widgets/widgets/qtabwidget.cpp | 2 +- 9 files changed, 24 insertions(+), 23 deletions(-) diff --git a/examples/widgets/widgets/icons/mainwindow.cpp b/examples/widgets/widgets/icons/mainwindow.cpp index 8e61260041..4f990f7320 100644 --- a/examples/widgets/widgets/icons/mainwindow.cpp +++ b/examples/widgets/widgets/icons/mainwindow.cpp @@ -361,7 +361,7 @@ QWidget *MainWindow::createImagesGroupBox() QVBoxLayout *layout = new QVBoxLayout(imagesGroupBox); layout->addWidget(imagesTable); return imagesGroupBox; -//! [25] +//! [24] } //! [26] diff --git a/src/corelib/serialization/qjsonarray.cpp b/src/corelib/serialization/qjsonarray.cpp index c5d4bf0315..08702771a8 100644 --- a/src/corelib/serialization/qjsonarray.cpp +++ b/src/corelib/serialization/qjsonarray.cpp @@ -175,12 +175,6 @@ void QJsonArray::initialize() */ QJsonArray::~QJsonArray() = default; -/*! - Creates a copy of \a other. - - Since QJsonArray is implicitly shared, the copy is shallow - as long as the object doesn't get modified. - */ QJsonArray::QJsonArray(std::initializer_list args) { initialize(); @@ -188,6 +182,12 @@ QJsonArray::QJsonArray(std::initializer_list args) append(arg); } +/*! + Creates a copy of \a other. + + Since QJsonArray is implicitly shared, the copy is shallow + as long as the object doesn't get modified. + */ QJsonArray::QJsonArray(const QJsonArray &other) { a = other.a; diff --git a/src/corelib/serialization/qjsonobject.cpp b/src/corelib/serialization/qjsonobject.cpp index ae37481f31..a6987279d3 100644 --- a/src/corelib/serialization/qjsonobject.cpp +++ b/src/corelib/serialization/qjsonobject.cpp @@ -1013,7 +1013,7 @@ QJsonObject::const_iterator QJsonObject::constFindImpl(T key) const Returns a pointer to a modifiable reference to the current item. */ -/*! \fn QJsonValueRef QJsonObject::iterator::operator[](int j) const +/*! \fn const QJsonValueRef QJsonObject::iterator::operator[](int j) Returns a modifiable reference to the item at offset \a j from the item pointed to by this iterator (the item at position \c{*this + j}). @@ -1264,7 +1264,7 @@ QJsonObject::const_iterator QJsonObject::constFindImpl(T key) const Returns a pointer to the current item. */ -/*! \fn QJsonValue QJsonObject::const_iterator::operator[](int j) const +/*! \fn const QJsonValue QJsonObject::const_iterator::operator[](int j) Returns the item at offset \a j from the item pointed to by this iterator (the item at position \c{*this + j}). diff --git a/src/corelib/serialization/qjsonvalue.cpp b/src/corelib/serialization/qjsonvalue.cpp index 6cf4c7fdf9..7b6728d525 100644 --- a/src/corelib/serialization/qjsonvalue.cpp +++ b/src/corelib/serialization/qjsonvalue.cpp @@ -149,7 +149,7 @@ QJsonValue::QJsonValue(bool b) } /*! - Creates a value of type Double, with value \a n. + Creates a value of type Double, with value \a v. */ QJsonValue::QJsonValue(double v) : d(nullptr) @@ -164,7 +164,7 @@ QJsonValue::QJsonValue(double v) /*! \overload - Creates a value of type Double, with value \a n. + Creates a value of type Double, with value \a v. */ QJsonValue::QJsonValue(int v) : n(v), t(QCborValue::Integer) @@ -173,7 +173,7 @@ QJsonValue::QJsonValue(int v) /*! \overload - Creates a value of type Double, with value \a n. + Creates a value of type Double, with value \a v. NOTE: the integer limits for IEEE 754 double precision data is 2^53 (-9007199254740992 to +9007199254740992). If you pass in values outside this range expect a loss of precision to occur. */ diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp index 94d22e288e..27e0d56225 100644 --- a/src/corelib/text/qbytearray.cpp +++ b/src/corelib/text/qbytearray.cpp @@ -5175,7 +5175,7 @@ void warn(WarningType w, EmittingClass c) */ /*! - \fn QByteArray::FromBase64Result::operator QByteArray() const + \fn QByteArray &QByteArray::FromBase64Result::operator*() const Returns the decoded byte array. */ @@ -5184,17 +5184,18 @@ void warn(WarningType w, EmittingClass c) \fn bool operator==(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs) noexcept \relates QByteArray::FromBase64Result - Compares \a lhs and \a rhs for equality. \a lhs and \a rhs are equal - if and only if they contain the same decoding status and, if the - status is QByteArray::Base64DecodingStatus::Ok, if and only if - they contain the same decoded data. + Returns \c true if \a lhs and \a rhs are equal, otherwise returns \c false. + + \a lhs and \a rhs are equal if and only if they contain the same decoding + status and, if the status is QByteArray::Base64DecodingStatus::Ok, if and + only if they contain the same decoded data. */ /*! \fn bool operator!=(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs) noexcept \relates QByteArray::FromBase64Result - Compares \a lhs and \a rhs for inequality. + Returns \c true if \a lhs and \a rhs are different, otherwise returns \c false. */ /*! diff --git a/src/corelib/text/qchar.cpp b/src/corelib/text/qchar.cpp index 847b4f0b08..61b61125b1 100644 --- a/src/corelib/text/qchar.cpp +++ b/src/corelib/text/qchar.cpp @@ -418,7 +418,7 @@ QT_BEGIN_NAMESPACE \value Script_Sogdian Since Qt 5.15 \value Script_SoraSompeng \value Script_Soyombo Since Qt 5.11 - \value Script_Sundaneseo + \value Script_Sundanese \value Script_SylotiNagri \value Script_Syriac \value Script_Tagalog diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 3ff8f886f1..77c8da7f4a 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -2638,7 +2638,7 @@ uint qHash(long double key, uint seed) noexcept \sa insert() */ -/*! \fn template QList QHash::uniqueKeys() const +/*! \fn template QList QMultiHash::uniqueKeys() const \since 5.13 Returns a list containing all the keys in the map. Keys that occur multiple @@ -2661,7 +2661,7 @@ uint qHash(long double key, uint seed) noexcept Inserts all the items in the \a other hash into this hash and returns a reference to this hash. - \sa unit(), insert() + \sa unite(), insert() */ /*! \fn template QMultiHash QMultiHash::operator+(const QMultiHash &other) const diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index 0828a795f1..1b72be66fe 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -1526,7 +1526,7 @@ QList QSslSocket::caCertificates() const default CA certificate database. \sa QSslConfiguration::caCertificates(), QSslConfiguration::addCaCertificates(), - QSslConfiguration::addDefaultCaCertificate() + QSslConfiguration::addCaCertificate() */ bool QSslSocket::addDefaultCaCertificates(const QString &path, QSsl::EncodingFormat encoding, QRegExp::PatternSyntax syntax) diff --git a/src/widgets/widgets/qtabwidget.cpp b/src/widgets/widgets/qtabwidget.cpp index 5b3dcfa45b..f0bfe67e3a 100644 --- a/src/widgets/widgets/qtabwidget.cpp +++ b/src/widgets/widgets/qtabwidget.cpp @@ -579,7 +579,7 @@ bool QTabWidget::isTabVisible(int index) const } /*! - If \a enable is true, the page at position \a index is visible; otherwise the page at + If \a visible is true, the page at position \a index is visible; otherwise the page at position \a index is hidden. The page's tab is redrawn appropriately. \sa isTabVisible() -- cgit v1.2.3