diff options
author | Martin Smith <martin.smith@qt.io> | 2018-01-23 12:19:33 +0100 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2018-01-24 10:02:08 +0000 |
commit | 4ca0d764546908dd31fc3794ddcead5582436097 (patch) | |
tree | 7a43605848c6355c9d563134d31ffb30e56b1174 /src/corelib/kernel/qobject.h | |
parent | f28d0d8ae83b7a9882c5f2d5c4a2e651bbe3597e (diff) |
doc: clang-qdoc must not see certain function declarations
The macro Q_DECLARE_INTERFACE declared some qobject_cast() functions
that clang-qdoc must not see in the contexts where the macro is used.
This update prevents that from happening by ensuring that Q_CLANG_QDOC
is not defined when the macro is defined.
This update also adds a \fn command for a declaration of qobject_cast()
that was missing in the documentation. There are two versions of the
function, one with a const parameter and one with a non-const parameter,
and they both share one qdoc comment.
Change-Id: Ic74d0aaae62767cd0391474ee95ae3f4f820b06e
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/corelib/kernel/qobject.h')
-rw-r--r-- | src/corelib/kernel/qobject.h | 2 |
1 files changed, 1 insertions, 1 deletions
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 <class T> 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<IFace *>() \ { return IId; } \ |