From fd6cfd22831c6ff7078bb97e62439375cfc849f6 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 6 May 2024 11:55:20 +0200 Subject: [PATCH] Docs: fix QT_NO_FOREACH/KEYWORDS macro documentation QT_NO_FOREACH didn't related to anything so the documentation wasn't generated, and QT_NO_KEYWORDS wasn't documented but referenced. Pick-to: 6.7 Change-Id: I7b79e61519c186d10f8e8c674705adb3d10bd53a Reviewed-by: Venugopal Shivashankar --- src/corelib/doc/src/foreach-keyword.qdoc | 3 +++ src/corelib/global/qglobal.cpp | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/corelib/doc/src/foreach-keyword.qdoc b/src/corelib/doc/src/foreach-keyword.qdoc index b3a4482528..6aa21d5880 100644 --- a/src/corelib/doc/src/foreach-keyword.qdoc +++ b/src/corelib/doc/src/foreach-keyword.qdoc @@ -81,7 +81,10 @@ /*! \macro QT_NO_FOREACH \since 6.0 + \relates Defining this macro removes the availability of Qt's \c foreach loop. + + \sa QT_NO_KEYWORDS */ diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 222c008f8a..99e4e49c9c 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -169,6 +169,19 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters) return false; } +/*! + \macro QT_NO_KEYWORDS + \relates + + Define this macro to disable the Qt-specific keywords that are usually enabled, + such as \c signals and \c slots. Use \c Q_SIGNALS and \c Q_SLOTS instead. + + Libraries should define this macro to make sure that they don't use the generic + keywords without the \c Q_ prefix in their public headers. + + \sa QT_NO_FOREACH +*/ + /*! \macro QT_NAMESPACE \internal