diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index dc43a95675..5b37945ae0 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -1093,7 +1093,9 @@ QObjectPrivate::Connection::~Connection() \sa metaObject() */ -/*! \fn template T *qobject_cast(QObject *object) +/*! + \fn template T qobject_cast(QObject *object) + \fn template T qobject_cast(const QObject *object) \relates QObject Returns the given \a object cast to type T if the object is of type diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index 9f38a6ef87..0e608a3208 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -517,7 +517,7 @@ inline T qobject_cast(const QObject *object) template inline const char * qobject_interface_iid() { return nullptr; } -#ifndef Q_MOC_RUN +#if !defined(Q_MOC_RUN) && !defined(Q_CLANG_QDOC) # define Q_DECLARE_INTERFACE(IFace, IId) \ template <> inline const char *qobject_interface_iid() \ { return IId; } \