From e228cd14e4f8d256596ff66d091f5c70b6562f59 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 2 Oct 2024 18:46:01 +0200 Subject: [PATCH] Create qdoc macros for C++ class docs 1.4: member-swap(), \internal We have some patterns for how to document certain functions, but we also vary the sentences a lot, and you have to look up one documentation piece and copy it, essentially. If we ever want to change them, we end up with shotgun surgery. So apply DRY to the documentation and start a collection of macros to help with repetitive C++ class documentation tasks. The first macro is for member-swap(), and this fourth patch is for documentation that used to be \internal. But the classes are public, so don't hide the swap() member functions, document them. Task-number: QTBUG-129573 Pick-to: 6.7 6.5 6.2 Change-Id: Id81b5ace05a7ccaf2a2194ebd56af10e8a98d7be Reviewed-by: Ivan Solovev (cherry picked from commit 5a9bd64366b2ce2757843db0358cd48e4369b3d7) Reviewed-by: Qt Cherry-pick Bot --- src/gui/image/qpixmapcache.cpp | 2 +- src/opengl/qopenglpixeltransferoptions.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp index cdde80b3a8f..ffc089129fb 100644 --- a/src/gui/image/qpixmapcache.cpp +++ b/src/gui/image/qpixmapcache.cpp @@ -144,8 +144,8 @@ bool QPixmapCache::Key::operator ==(const Key &key) const /*! \fn void QPixmapCache::Key::swap(Key &) - \internal \since 5.6 + \memberswap{key} */ /*! diff --git a/src/opengl/qopenglpixeltransferoptions.cpp b/src/opengl/qopenglpixeltransferoptions.cpp index 2e6766ca6a8..100de4689dd 100644 --- a/src/opengl/qopenglpixeltransferoptions.cpp +++ b/src/opengl/qopenglpixeltransferoptions.cpp @@ -21,7 +21,7 @@ QT_BEGIN_NAMESPACE /*! * \fn void QOpenGLPixelTransferOptions::swap(QOpenGLPixelTransferOptions &other) - * \internal + * \memberswap{options} */ class QOpenGLPixelTransferOptionsData : public QSharedData