diff options
author | Topi Reinio <topi.reinio@qt.io> | 2023-03-23 15:54:16 +0000 |
---|---|---|
committer | Topi Reinio <topi.reinio@qt.io> | 2023-03-24 10:19:12 +0000 |
commit | 65e94d012b7d38669e9cdc4e885bdc34a86607af (patch) | |
tree | 25c1eb8471f12210abf84607a226a40fae08430e /src/qdoc/cppcodeparser.cpp | |
parent | 9b4f32d9abc657fcf9d42587e40ff85d7125cfc7 (diff) | |
download | qttools-65e94d012b7d38669e9cdc4e885bdc34a86607af.tar.gz |
qdoc: Warn about documented global functions that generate no docs
Generator::generateDocumentation() recursively traverses the tree of
PageNode objects, i.e. nodes that generate output. However, it did
not check if there are documented nodes in the global scope (root
namespace) that generate no output.
A typical case where this happens is global functions, where the
author forgot to associate the function to something using the
\relates command.
Make QDoc print out a warning for these nodes, and mark them
to have 'DontDocument' status so they will be ignored later on
for linking and inclusion in the .qhp file.
Also in Generator::generateDocumentation(), rename a variable local
to a for-loop from 'node' to 'child', to prevent shadowing a 'node'
in the outer scope.
Pick-to: 6.5
Fixes: QTBUG-112256
Change-Id: I74fcc704f6848fc1eef8529da80f57678a83766e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/qdoc/cppcodeparser.cpp')
0 files changed, 0 insertions, 0 deletions