Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.4
-
None
Description
When qdoc encounters a documented function definition without a prior declaration in a header
/*! Checks if the application has a \e{package identity} Having a \e{package identity} is required to use many modern Windows APIs. https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/modernize-packaged-apps */ bool qt_win_hasPackageIdentity() { }
it spits out a warning like:
/home/qt/work/qt/qtbase/src/corelib/kernel/qfunctions_win.cpp:35: (qdoc) warning: Cannot tie this documentation to anything [qdoc found a /*! ... */ comment, but there was no topic command (e.g., '\fn', '\page') in the comment and no function definition following the comment.]
The problem here was that the declaration in the header was behind a
#if defined(Q_OS_WIN) so qdoc never saw it.
As the "no function definition following the comment" part is clearly wrong, it would be helpful if qdoc could somehow detect and distinguish this case from one where there is in fact no function definition following the comment.