Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2577

Shiboken error when parsing doxygen xml files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P5: Not important
    • 6.5.4, 6.6.2, 6.7.0
    • 6.2.4, 6.6.1
    • Shiboken
    • None
    • Linux/X11
    • d39860235 (dev), d4eaa6d97 (6.6), 2c13115ad (tqtc/lts-6.5)

    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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            david.bosch David Bosch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes