Details
Description
When using Shiboken to generate documentation and the input files are from doxygen, the queries generated to search for const methods are wrong.
To reproduce, decompress the attached files and inside the folder run:
doxygen Doxyfile
It will generate, among other things, xml/classFoo.xml
<doxygen ...> <compounddef id="classFoo" kind="class" language="C++" prot="public"> ... <sectiondef kind="public-func"> ... <memberdef ...> ... <argsstring>() const</argsstring> <name>testFunction</name> <briefdescription> </briefdescription> <detaileddescription> <para>This is a test function. </para> </detaileddescription> ...
Then run
shiboken6 --generator-set=qtdoc -I. --output-directory=./doc --documentation-data-dir=./xml --library-source-dir=. --doc-parser=doxygen ./wrappedclasses.h ./test.xml
to generate the module documentation. The output is:
qt.shiboken: (test) CLANG builtins includes directory: /usr/lib/llvm-14/lib/clang/14.0.0/include (test) clang_parseTranslationUnit2(0x0, cmd[8]=-isystem/usr/lib/llvm-14/lib/clang/14.0.0/include -fPIC -Wno-constant-logical-operand -x c++ -std=c++17 -I. /tmp/wrappedclasses_ExFzLI.hpp) (test) [8ms] Generating class model (1)... [OK] (test) [8ms] Generating enum model (0)... [OK] (test) [8ms] Generating namespace model (0)... [OK] (test) [8ms] Resolving typedefs (0)... [OK] (test) [8ms] Fixing class inheritance... [OK] (test) [8ms] Detecting inconsistencies in class model... [OK] (test) [8ms] Detecting inconsistencies in typesystem (22)... [OK] (test) [8ms] Checking inconsistencies in function modifications... [OK] (test) [8ms] Writing log files... [OK] (test) [8ms] Running QtDocGenerator... qt.shiboken.doc: (test) Cannot find documentation for function Foo::testFunction() const in: ./xml/classFoo.xml using query: /doxygen/compounddef/sectiondef[@kind="public-func"]/memberdef/name[text()="testFunction"]/../argsstring[text()="() const "]/../briefdescription qt.shiboken.doc: (test) Cannot find documentation for function Foo::testFunction() const in: ./xml/classFoo.xml using query: /doxygen/compounddef/sectiondef[@kind="public-func"]/memberdef/name[text()="testFunction"]/../argsstring[text()="() const "]/../detaileddescription qt.shiboken.doc: (test) Can't find doxygen XML file for module FooLib, tried: ./xml/indexpage.xml [WARNING] Done, (test) 9ms, 3 warnings
Shiboken wasn't able to find the comments for testFunction and they are missing in the rst file.
If you look in the output at the query for testFunction, there is a space in "() const " that doesn't exist in the xml file.
Attachments
For Gerrit Dashboard: PYSIDE-2577 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
529904,2 | Documentation/doxygen: Fix querying const functions | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
530020,2 | Documentation/doxygen: Fix querying const functions | 6.6 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
530715,2 | Documentation/doxygen: Fix querying const functions | tqtc/lts-6.5 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |