Skip to content

Commit

Permalink
Doc: Fix documentation warnings
Browse files Browse the repository at this point in the history
These warnings slipped in during a time period where documentation
testing in the CI was disabled.

src/network/kernel/qhostinfo.cpp:254: (qdoc) warning: clang couldn't
    find function when parsing \fn template<typename Functor>
    int QHostInfo::lookupHost(const QString &name, Functor functor)

src/widgets/widgets/qcheckbox.cpp:102: (qdoc) warning: clang couldn't
    find function when parsing
    \fn void QCheckBox::stateChanged(Qt::CheckState state)

src/corelib/kernel/qcoreapplication.cpp:2769: (qdoc) warning: clang
    couldn't find function when parsing
    \fn template<typename Functor> void
        QCoreApplication::requestPermission(
        const QPermission &permission, Functor functor)

src/corelib/serialization/qxmlstream.cpp:3806: (qdoc) warning: clang
    couldn't find function when parsing
    \fn bool QXmlStreamAttributes::hasAttribute(
        const QString &qualifiedName) const

src/corelib/text/qtliterals.qdoc:11: (qdoc) warning: Multiple topic
    commands found in comment: \namespace and \headerfile.

Pick-to: 6.5
Change-Id: I38c605f358dbca1ef3e2bfe20a6424f7a4d44b4a
Reviewed-by: Volker Hilsheimer <[email protected]>
  • Loading branch information
toreinio committed Apr 29, 2023
1 parent 4160817 commit 37dc52d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/corelib/kernel/qcoreapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2768,7 +2768,7 @@ Qt::PermissionStatus QCoreApplication::checkPermission(const QPermission &permis

/*!
\fn template<typename Functor> void QCoreApplication::requestPermission(
const QPermission &permission, Functor functor)
const QPermission &permission, Functor &&functor)
Requests the given \a permission.
Expand Down
14 changes: 3 additions & 11 deletions src/corelib/serialization/qxmlstream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3804,8 +3804,7 @@ void QXmlStreamWriter::writeCurrentToken(const QXmlStreamReader &reader)
}

/*!
\fn bool QXmlStreamAttributes::hasAttribute(const QString &qualifiedName) const
\since 4.5
\fn bool QXmlStreamAttributes::hasAttribute(QAnyStringView qualifiedName) const
Returns \c true if this QXmlStreamAttributes has an attribute whose
qualified name is \a qualifiedName; otherwise returns \c false.
Expand All @@ -3819,16 +3818,9 @@ void QXmlStreamWriter::writeCurrentToken(const QXmlStreamReader &reader)
*/

/*!
\fn bool QXmlStreamAttributes::hasAttribute(QLatin1StringView qualifiedName) const
\fn bool QXmlStreamAttributes::hasAttribute(QAnyStringView namespaceUri,
QAnyStringView name) const
\overload
\since 4.5
*/

/*!
\fn bool QXmlStreamAttributes::hasAttribute(const QString &namespaceUri,
const QString &name) const
\overload
\since 4.5
Returns \c true if this QXmlStreamAttributes has an attribute whose
namespace URI and name correspond to \a namespaceUri and \a name;
Expand Down
4 changes: 2 additions & 2 deletions src/corelib/text/qtliterals.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
/*!
\namespace Qt::Literals
\inmodule QtCore
\headerfile QtLiterals
\inheaderfile QtLiterals

\brief The Literals inline namespace declares literal operators for Qt types.
*/

/*!
\namespace Qt::Literals::StringLiterals
\inmodule QtCore
\headerfile QStringLiterals
\inheaderfile QStringLiterals

\brief The StringLiterals namespace declares string literal operators
for Qt types.
Expand Down
2 changes: 1 addition & 1 deletion src/network/kernel/qhostinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ int QHostInfo::lookupHost(const QString &name, QObject *receiver, const char *me
*/

/*!
\fn template<typename Functor> int QHostInfo::lookupHost(const QString &name, Functor functor)
\fn template<typename Functor> int QHostInfo::lookupHost(const QString &name, Functor &&functor)
\since 5.9
Expand Down
12 changes: 1 addition & 11 deletions src/widgets/widgets/qcheckbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,25 +89,15 @@ class QCheckBoxPrivate : public QAbstractButtonPrivate
\sa QAbstractButton, QRadioButton
*/

#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
/*!
\fn void QCheckBox::stateChanged(int state)
//! Qt 7: \fn void QCheckBox::stateChanged(Qt::CheckState state)
This signal is emitted whenever the checkbox's state changes, i.e.,
whenever the user checks or unchecks it.
\a state contains the checkbox's new Qt::CheckState.
*/
#else
/*!
\fn void QCheckBox::stateChanged(Qt::CheckState state)
This signal is emitted whenever the checkbox's state changes, i.e.,
whenever the user checks or unchecks it.
\a state contains the checkbox's new Qt::CheckState.
*/
#endif

/*!
\property QCheckBox::tristate
Expand Down

0 comments on commit 37dc52d

Please sign in to comment.