Details
-
Suggestion
-
Resolution: Fixed
-
P2: Important
-
None
-
None
-
f6d6666c4 (dev), a3bc8fc56 (dev), 4ed994487 (dev), 9c032ad5f (6.8)
-
DaVinci 94
Description
QDoc provides a way to document CMake instructions by way of the \qtcmakepackage command. This command is restricted such that it can only be used at the module level (in other words, in the same comment that contains the \module command). The command injects the module name in the CMake instructions that are generated in the header table of each class reference page that belongs to said module. For most of Qt's APIs, this works fine. However; there are certain APIs that are "semi-public" in the sense that they're publically documented, while the symbols belong to a private Qt library (e.g. CorePrivate, GuiPrivate, etc.). In such cases, the automatically generated documentation is incorrect.
There are at least two separately known use-cases for a command that allows overriding specifically the target_link_libraries item, see QTBUG-109214 and QTBUG-121855. In both these cases, the find_package call is correct, while the target_link_libraries item is wrong.
I propose the command \qtcmaketargetitem. This (specifically, the use of 'item') is in accordance with the CMake documentation for target_link_libraries. The command should be allowed in the context of any C++ type documentation page, and should override whatever is propagated from the \qtcmakepackage command.
Attachments
Issue Links
- is required for
-
QTBUG-128806 Wrong instructions for adding QGeoJson to project
- Closed
- resulted from
-
QTBUG-109214 Documentation for QtAndroidPrivate is still wrong for CMake
- Closed
-
QTBUG-121855 missing RHI related headers (class documentation is wrong)
- Closed