summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Di Sera <luca.disera@qt.io>2023-11-10 14:08:04 +0100
committerLuca Di Sera <luca.disera@qt.io>2023-11-18 15:00:31 +0100
commitb667d19641ea3c2b5bf47cffdc25445b51af3a3b (patch)
tree364dd2c2dd20cfed9197d9d90c4487e50944239d
parentac9fdf36b026b08e3225dc24d5398c333594c41f (diff)
Doc: Fix template information for QFutureWatcher members
When QDoc parses a project, it parses the source code to extract the user-provided documentation and perform sanity checkings based on the code itself on it. When QDoc parses an "\fn" command as part of this process, it tries to understand, based on its intermediate representation built on the information extracted from the code-base, which "documentable element" the "\fn" refers to. When QDoc performs this "matching" process, it takes into consideration only a certain amount of information. For example, no checking is performed over the template declaration of a callable. Due to some upcoming documentation, where two callables are indistinguishable to the current process, as they differ only in their template declaration, QDoc will start to take into consideration the template declaration of a callable when matching. This implies that an "\fn" command should now provide information parity, with regards to template declaration for callables, with the code-base so that QDoc can perform the match correctly. The documentation for some of the members of `QFutureWatcher` is not in sync with the intended target template declaration. Hence, add the missing information to the relevant "\fn" commands. Task-number: QTBUG-118080 Change-Id: I33932d0ef693f6e045ecf4414d05dadfb66d3d09 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
-rw-r--r--src/corelib/thread/qfuturewatcher.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/thread/qfuturewatcher.cpp b/src/corelib/thread/qfuturewatcher.cpp
index 0ae406d356..2cffadfa5b 100644
--- a/src/corelib/thread/qfuturewatcher.cpp
+++ b/src/corelib/thread/qfuturewatcher.cpp
@@ -552,7 +552,7 @@ QT_WARNING_POP
}
-/*! \fn template <typename T> const T &QFutureWatcher<T>::result() const
+/*! \fn template <typename T> template<typename U = T, typename = QtPrivate::EnableForNonVoid<U>> const T &QFutureWatcher<T>::result() const
Returns the first result in the future(). If the result is not immediately
available, this function will block and wait for the result to become
@@ -561,7 +561,7 @@ QT_WARNING_POP
\sa resultAt()
*/
-/*! \fn template <typename T> const T &QFutureWatcher<T>::resultAt(int index) const
+/*! \fn template <typename T> template<typename U = T, typename = QtPrivate::EnableForNonVoid<U>> const T &QFutureWatcher<T>::resultAt(int index) const
Returns the result at \a index in the future(). If the result is not
immediately available, this function will block and wait for the result to