[Development] qdoc help needed: it isn't seeing a function that is clearly there

Marc Mutz marc.mutz at qt.io
Tue Aug 9 10:07:49 CEST 2022

This is https://bugreports.qt.io/browse/QTBUG-101649

I don't see why qdoc shouldn't repeat a failed lookup for

   \relates T
   \fn foo(x)

as if

  \fn T::foo(x)

were given, but I guess we all need to first learn to work around it, and then change back once it's fixed.

But qdoc being weird should _not_ be a reason to make it non-hidden. We want hidden friends very much, because the alternative is

    // foo.cpp
    #include <QtCore>
    class Foo {};
    void f() {
        QDataStream ds;
        Foo foo;
        ds << foo;

  $ ninja foo | wc -l


On 25.07.22 21:27, Thiago Macieira 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20220809/ea93b95d/attachment.htm>

More information about the Development mailing list