diff options
author | Luca Di Sera <luca.disera@qt.io> | 2023-10-13 12:10:52 +0200 |
---|---|---|
committer | Luca Di Sera <luca.disera@qt.io> | 2023-10-13 18:00:37 +0200 |
commit | 31eb5e238b4ba437bb7fa8a286b5d913dd3f093c (patch) | |
tree | 877645edf6836b86818836135aa1cb5d0ef6d387 | |
parent | 6e7f7f6f48e35e09de415bbdeef87d55fefa81ec (diff) |
Doc: Add missing return type to QDBusReply::value
When QDoc reads an `\fn` command it saves it to a file to parse it with
Clang, with the objective of using the produced AST to perform certain
sanity checks on the documented element.
Generally, `\fn` commands that do not represent correct C++ code are
accepted as long as Clang is still able to build an AST Node that QDoc
can work with, not resulting in any issue in the output documentation.
For example, an `\fn` that doesn't state a return type might be able to
be parsed correctly enough by Clang to produce a sensible Node for the
function that QDoc is interested into.
The documentation for `QDBusReply::value` make
use of this possibility by not stating a return type.
Up to Clang 15 this was not an issue, and a correct-enough AST was
produced when the `\fn` commands for those methods were parsed.
On Clang 16, Clang chokes on the missing return type, being unable to
recognize the function definition and produce an AST that QDoc can work
with.
This has the effect of losing those documented element in the output
documentation.
To avoid the issue, a return type is now added to the relevant `\fn`
commands.
Task-number: QTBUG-111580
Change-Id: Ia70404c7ad548cb1e144bec99943cf72c990bb83
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
-rw-r--r-- | src/dbus/qdbusreply.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dbus/qdbusreply.cpp b/src/dbus/qdbusreply.cpp index 3b9e24eaf8..5b26250b10 100644 --- a/src/dbus/qdbusreply.cpp +++ b/src/dbus/qdbusreply.cpp @@ -141,7 +141,7 @@ using namespace Qt::StringLiterals; */ /*! - \fn template <typename T> QDBusReply<T>::value() const + \fn template <typename T> Type QDBusReply<T>::value() const Returns the remote function's calls return value. If the remote call returned with an error, the return value of this function is undefined and may be undistinguishable from a valid return value. |