Skip to content

Commit

Permalink
Create qdoc macros for C++ class docs 1.4: member-swap(), \internal
Browse files Browse the repository at this point in the history
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 <ivan.solovev@qt.io>
(cherry picked from commit 5a9bd64)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
  • Loading branch information
marcmutz authored and Qt Cherry-pick Bot committed Nov 12, 2024
1 parent b8c9a4c commit e228cd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gui/image/qpixmapcache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ bool QPixmapCache::Key::operator ==(const Key &key) const

/*!
\fn void QPixmapCache::Key::swap(Key &)
\internal
\since 5.6
\memberswap{key}
*/

/*!
Expand Down
2 changes: 1 addition & 1 deletion src/opengl/qopenglpixeltransferoptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ QT_BEGIN_NAMESPACE

/*!
* \fn void QOpenGLPixelTransferOptions::swap(QOpenGLPixelTransferOptions &other)
* \internal
* \memberswap{options}
*/

class QOpenGLPixelTransferOptionsData : public QSharedData
Expand Down

0 comments on commit e228cd1

Please sign in to comment.