[Development] qdoc help needed: it isn't seeing a function that is clearly there
Topi.Reinio at qt.io
Tue Jul 26 07:36:22 CEST 2022
This will be documented in the qdoc manual as well, see https://doc-snapshots.qt.io/qt6-dev/13-qdoc-commands-topics.html#fn-command
In the generated class reference, the hidden friend will appear as a 'related non-member'.
From: Development <development-bounces at qt-project.org> on behalf of Volker Hilsheimer <volker.hilsheimer at qt.io>
Sent: Monday, July 25, 2022 11:28:58 PM
To: Macieira, Thiago <thiago.macieira at intel.com>
Cc: development at qt-project.org <development at qt-project.org>
Subject: Re: [Development] qdoc help needed: it isn't seeing a function that is clearly there
> On 25 Jul 2022, at 21:27, Thiago Macieira <thiago.macieira at intel.com> wrote:
> In https://codereview.qt-project.org/c/qt/qtbase/+/422690
> /home/qt/work/qt/qtbase/src/corelib/kernel/qmetatype.cpp:3032: (qdoc) warning:
> clang couldn't find function when parsing \fn int qRegisterMetaType(QMetaType
> The function exists because it's unit-tested and compiled. Why can't qdoc see
> it? It's a hidden friend, but that's valid C++ and clang should see it.
In clang’s AST, hidden friends are placed like class member functions, so they have to be documented like class members, e.g.
\fn int QMetaType::qRegisterMetaType(QMetaType meta)
This is misleading in this case, and outright invalid C++ in case of operators as hidden friends, but it works with the latter, and I expect it will make it work with this as well.
Development mailing list
Development at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development