summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qshareddata.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2024-10-02 18:46:01 +0200
committerMarc Mutz <marc.mutz@qt.io>2024-11-08 22:49:21 +0100
commit82058367923ce164024885854c139ee5e0d89949 (patch)
tree1ba22e7a7ac3fa4e815d1721e98771cde4790c75 /src/corelib/tools/qshareddata.cpp
parent5627e113793df3df24742d7af502a075c2c9e95d (diff)
Create qdoc macros for C++ class docs 1.3: member-swap(), non-standard phrasing
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 third patch is for documentation that used a non-standard phrasing for documenting member-swap(). By using the macro, the documentation automatically conforms to what the documentation team picks as the \memberswap expansion going forward. As a drive-by, fix doc block indentation to the Qt standard of 4 spaces (only in changed lines), and add a few blank lines where they were missing before. Fixes: QTBUG-129573 Pick-to: 6.8 6.7 6.5 6.2 Change-Id: If007602d7690572fcbb848a8d0235416c908cfd2 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/corelib/tools/qshareddata.cpp')
-rw-r--r--src/corelib/tools/qshareddata.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/corelib/tools/qshareddata.cpp b/src/corelib/tools/qshareddata.cpp
index 2f8cf98230c..1be76bd2076 100644
--- a/src/corelib/tools/qshareddata.cpp
+++ b/src/corelib/tools/qshareddata.cpp
@@ -313,8 +313,7 @@ QT_BEGIN_NAMESPACE
*/
/*! \fn template <class T> void QSharedDataPointer<T>::swap(QSharedDataPointer &other)
- Swap this instance's shared data pointer with the shared
- data pointer in \a other.
+ \memberswap{shared data pointer}
*/
/*!
@@ -508,8 +507,7 @@ QT_BEGIN_NAMESPACE
*/
/*! \fn template <class T> void QExplicitlySharedDataPointer<T>::swap(QExplicitlySharedDataPointer &other)
- Swap this instance's explicitly shared data pointer with
- the explicitly shared data pointer in \a other.
+ \memberswap{explicitly-shared data pointer}
*/
/*! \fn template <class T> bool QExplicitlySharedDataPointer<T>::operator==(const QExplicitlySharedDataPointer<T>& lhs, const QExplicitlySharedDataPointer<T>& rhs)