doc: Let qdoc ignore Q_DECLARE_INTERFACE
This macro declares three template functions that are different for each use of the macro. The functions are in the public API but they are not meant to be documented. This update just defines the macro to be empty so clang in qdoc will ignore it. Without this, clang reports a lot of errors incorrectly, but if we let clang process the macro, it declares all those extra functions which then must be documented with \internal in the cpp files, and we don't want to do that. This will probably be redone in a later version using a custom annotation attribute. Change-Id: I78ae4bcc98a3844b803d7ef7b1eba5d5539b043f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
f5654d909a
commit
83bf7d8260
@ -517,7 +517,10 @@ inline T qobject_cast(const QObject *object)
|
||||
template <class T> inline const char * qobject_interface_iid()
|
||||
{ return nullptr; }
|
||||
|
||||
#if !defined(Q_MOC_RUN) && !defined(Q_CLANG_QDOC)
|
||||
|
||||
#if defined(Q_CLANG_QDOC)
|
||||
# define Q_DECLARE_INTERFACE(IFace, IId)
|
||||
#elif !defined(Q_MOC_RUN)
|
||||
# define Q_DECLARE_INTERFACE(IFace, IId) \
|
||||
template <> inline const char *qobject_interface_iid<IFace *>() \
|
||||
{ return IId; } \
|
||||
|
Loading…
Reference in New Issue
Block a user