summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLuca Di Sera <luca.disera@qt.io>2023-03-17 16:42:24 +0100
committerLuca Di Sera <luca.disera@qt.io>2023-03-19 16:04:48 +0100
commit407f831e79fe2c3f662c82cb196afc49b1ec2934 (patch)
tree70702e5d30754f079ca79d5580a9873479e59fe8 /tests
parentbf03e5a11f4052e74da260bfedcf23f4761113af (diff)
downloadqttools-407f831e79fe2c3f662c82cb196afc49b1ec2934.tar.gz
QDoc: Move `CodeParser::checkModuleInclusion` to "cppcodeparser.cpp"
As part of extracting user-provided documentation, QDoc has to parse a variety of source files in a variety of languages. `CodeParser` is the base class of objects that take care of performing this parsing process in QDoc. When extracting the documentation in one of the `CodeParser`s QDoc generally tries to parse the extracted documentation in-place. For certain documentable elements, QDoc expects that an "\inmodule" commands is provided, as it requires it to understand where to position them when generating the output documentation. To ensure that this constraint is satisfied, CppCodeParser`, the `CodeParser` subclass that takes care of providing the semantic for QDoc block-comments, calls at a certain point `CodeParser::checkModuleInclusion`, a method that makes sure that the internal representation of the comment-block and the documented element have a valid "\inmodule" information for the later stages. `checkModuleInclusion` is only called by `CppCodeParser` and does not require any instance-state that would not otherwise be available. Hence, `checkModuleInclusion` is removed from `CodeParser` in favor of being a static in "cppcodeparser.cpp", just above its actual usage. An access to `m_qdb`, an instance-member for `CodeParser` that reference the `QDocDatabase` singleton was modified to directly obtain a `QDocDatabase` instance, as the member is not available outside `CodeParser`s. Change-Id: I0a8abc53d3c4fbd3e6687254a0034a3e12a6e018 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions