Details
-
User Story
-
Resolution: Done
-
P4: Low
-
None
-
None
Description
Prerequisites
- Shiboken build with docs (requires libXSLT, libXML2)
- Module sphinx sphinx_rtd_themes
- Pass path to Qt source via setup.py -qt-src-dir (unless in-source build or installed SDK)
- Presence of dot (graphviz)
- qdoc with WebXML output format (Qt 5.11 or higher)
Process
- qdoc generates documentation in WebXML
- shiboken code generator transforms them to .rst files applying some modifications specified in the PySide2 .xml files.
- The sphinx tool is used to create documentation using various conf.py files. For example from the build
How to test
- In the build dir (fex pyside-setup-dev/testenv_dev_22_build/py2.7-qt5.11.0-64bit-release/pyside2), run make apidoc
- launch doc/html/index.html
- To re-run sphinx only in the doc folder:
sphinx-build -b html rst html
Relevant commits
- "Pass the include paths to qdoc", e5312f9ca5d38230e397d05190e623b083724bf5 qtbase/ https://codereview.qt-project.org/#/c/153214/
- "Move the documentation for the classes to their modules." e86df8cc4b6a522fac909687d48b269c7f5108b6 https://codereview.qt-project.org/#/c/5520/
Open Issues
- .qddoconf files for multiple modules (as for Qt3D) are not handled correctly
- qdoc produces less output when run against a shadow build/installed package compared to an in-source developer build (still missing include paths)?
- Find a featured example?
- Snippets (see below)
Snippets
Snippets are resolved by shiboken2 in the doc transformation process (approx 490).
- quotefile does not work for module != qtbase (qtxmlpatterns/quiloader). Need to split "library-source-dir" to accept a path as well
- Snippets for new code not found
- Some snippets no longer found or reorganized/completely rewritten in Qt 5.
ToDo
- After running qdoc over each module, shiboken runs on a generated header containing all modules. Works currently but may not scale in the future. Split this somehow?
Attachments
Issue Links
- depends on
-
QTBUG-66528 qdoc/webxml: Too many "const" generated into webxml files
- Closed
-
QTBUG-66545 qdoc/webxml: -module pages are not generated
- Closed
-
PYSIDE-691 Doc: Update documentation and snippets
- Closed
- relates to
-
QTBUG-66925 QtXmlPatterns: XPath expression specifying number of element to match does not work with XSLT2
- Reported
- resulted in
-
PYSIDE-672 shiboken: Refactor code handling C++ types
- Closed
Gerrit Reviews
For Gerrit Dashboard: PYSIDE-363 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
172283,2 | Remove shiboken option --documentation-only from doc/CMakeLists.txt | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
173783,4 | setup: Add QT_SRC_DIR variable | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
205247,6 | qdoc: Revive the WebXML generator | dev | qt/qttools | Status: MERGED | +2 | 0 |
205437,1 | qtdocparser: Default to suffix '.webxml' | 5.6 | pyside/pyside-setup | Status: ABANDONED | 0 | 0 |
205438,1 | Typesystem parser: Look up external injected code snippets in typesystem path | 5.6 | pyside/pyside-setup | Status: ABANDONED | 0 | 0 |
205485,3 | qtdocparser: Default to suffix '.webxml' | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
205486,3 | Typesystem parser: Look up external injected code in typesystem path | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
205659,17 | Revive PySide2 API documentation | 5.9 | pyside/pyside-setup | Status: MERGED | -2 | 0 |
207116,6 | qdoc: Make doc configuration aware of the output format | dev | qt/qttools | Status: MERGED | +2 | 0 |
212087,6 | setup.py: Ensure that the Qt source path is correct | 5.9 | pyside/pyside-setup | Status: MERGED | -2 | 0 |
215579,4 | pysideinclude.py: Fix reading included files | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
215900,15 | Move examples from submodule to pyside-setup | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
216448,2 | Example: Ensure absolute path is used to load a QML file | 5.9 | pyside/pyside-setup | Status: ABANDONED | 0 | 0 |
216518,3 | Example: Adjust the boundingRect for the PieChart | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
216533,3 | tst_licenses.pl: Add exclusions for ui forms in moved PySide2 examples | master | qt/qtqa | Status: MERGED | +2 | 0 |
216534,2 | Re-add header.BSD-OLD | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
216539,2 | Remove old license header templates | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
216735,3 | Add missing image to widgets/animation/animatedtiles | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
217046,10 | Doc: Adapt QML basics tutorial for Qt Quick 2 | 5.9 | pyside/pyside-setup | Status: MERGED | -2 | 0 |
217872,4 | Re-add Qt Creator Python project file examples.pyqtc | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
218071,7 | qdoc: Add a logging category | 5.11 | qt/qttools | Status: MERGED | +2 | 0 |
218399,3 | Update documentation HTML templates | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
218400,3 | Remove unneeded documentation logos | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
218427,2 | qdoc: Add more include paths | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
218428,3 | Add more qdocconf files | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
218662,3 | shiboken/QtDocGenerator: Copy images | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
219225,2 | Docs: Add QtQml, QtQuickWidgets and the Qt3D modules | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
219425,6 | Port the QtCharts/Audio example | 5.9 | pyside/pyside-setup | Status: MERGED | -2 | 0 |
219619,4 | QtXmlToSphinx: Improve error handling for snippets | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
219620,3 | Fix some spelling errors in qtdocgenerator.h/.cpp | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
219621,3 | Refactor QtDocGenerator::writeFormattedText() | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
219622,2 | Refactor QtXmlToSphinx::readFromLocation() | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
219692,2 | Rename code snippet for QValidator classes | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
220270,2 | qdoc/Config::findFile() Make userFriendlyFilePath an optional out parameter | 5.11 | qt/qttools | Status: MERGED | +2 | 0 |
220271,3 | qdoc/webxml: Output resolved snippet path | 5.11 | qt/qttools | Status: MERGED | +2 | 0 |
220275,3 | shiboken/docgenerator: Fall back to C++ snippet when Python snippet cannot be found | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
220368,2 | Initial fixes of the doc snippets | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
220438,4 | shiboken/docgenerator: Handle empty snippets | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
220475,2 | Move and fix some snippets | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
220535,2 | shiboken: Fix loops in QtDocGenerator::writeConstructors() | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
220537,2 | shiboken/docgenerator: Remove helper createRepeatedChar() | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
220538,3 | shiboken/docgenerator: Refactor code using split() | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
220539,2 | shiboken/docgenerator: Pad table rows up to header column count | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
220540,2 | shiboken/docgenerator: Refactor code doing the escapes for rst | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
220888,2 | DocParser: Add helper function to create list of documentable functions | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
220889,3 | Documentation extraction: Add error handling | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
220890,2 | QtDocParser: Fix and refactor queries | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
220981,4 | Add sphinx2tasks.pl for converting sphinx warning logs into .tasks files | 4.6 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
220995,2 | QtDocGenerator: Add newline before Synopsis/Detailed Description | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
220996,4 | QtDocGenerator: Ensure newline before tables | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
221015,2 | QtDocGenerator: Indent the function list container | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
221166,5 | QtDocGenerator/QtXmlToSphinx: Fix see-also links | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
221238,3 | sphinx: Remove deprecated config keys | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
221500,2 | Fix inheritance_diagram.py to run with Python3 | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
221507,3 | shiboken/qtdocgenerator: Pass full name for inheritance diagram | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
221530,2 | shiboken/qtdocgenerator: Escape more characters | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
221544,3 | shiboken/qtdocgenerator: Fix inline images | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
221757,1 | WIP: Fix the shiboken doc SVGs | 5.9 | pyside/pyside-setup | Status: ABANDONED | -2 | 0 |
221840,4 | Documentation/inheritance_diagram.py: Fix import logic | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
222002,2 | Update the pysideversion.rst document | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
222243,2 | QtCore: Fix documentation modifications | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
222260,7 | shiboken/qtdocgenerator: Fall back to QtXmlPatterns when libxml/libxslt cannot be found | 5.9 | pyside/pyside-setup | Status: MERGED | -2 | 0 |
223147,2 | Docs/inheritance_diagram.py: Remove compat import | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
224098,2 | QtXmlToSphinx::Table: Fix crash when having a rowspan > 1 in the last row | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
224111,13 | Add option to create additional documentation | 5.9 | pyside/pyside-setup | Status: MERGED | -2 | 0 |
224861,39 | Start a tabbed browser example | 5.9 | pyside/pyside-setup | Status: MERGED | -2 | 0 |
225211,3 | shiboken: Exclude smart-pointer-type from documentation | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
225397,8 | Fix qt_attribution.json | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
225404,7 | Add tool for creating a license page | 5.9 | pyside/pyside-setup | Status: MERGED | -2 | 0 |
226007,5 | Add shiboken2/ApiExtractor doc generation | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
226162,8 | Add references from ApiExtractor to shiboken doc | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
226506,3 | shiboken: Fix XQuery for the module description | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
226508,3 | QtDocParser: Fix querying WebXML for functions with container arguments | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
226861,2 | WIP: Add find toolbar to the tabbed browser | 5.9 | pyside/pyside-setup | Status: ABANDONED | -2 | 0 |
227919,3 | Add Positioning, Location and Sensors to documentation | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
227936,3 | QtXmlToSphinx: Refactor label handling | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
227937,3 | QtXmlToSphinx: Add support for more elements | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
228004,2 | Decode qtattributionsscanner output to UTF-8 | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
228163,2 | Doc: Add license page to TOC | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
228321,4 | Docs: Point to Qt online documentation for QML types | 5.9 | pyside/pyside-setup | Status: MERGED | -2 | 0 |
228369,6 | QtXmlToSphinx: Refactor link handling | 5.9 | pyside/pyside-setup | Status: MERGED | -2 | 0 |
229386,2 | Make it possible to specify a target directory for additional documentation | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
229440,3 | Update Logo to the "Qt for Python" logo, 400x94 | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
229655,1 | Make it possible to specify a target directory for additional documentation | 5.11 | pyside/pyside-setup | Status: ABANDONED | 0 | 0 |
229658,1 | Update Logo to the "Qt for Python" logo, 400x94 | 5.11 | pyside/pyside-setup | Status: ABANDONED | 0 | 0 |
229871,2 | Documentation: Skip methods added by the meta builder | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
229876,2 | Documentation: Improve function documentation extraction | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
230643,2 | Documentation: Fix some oversights in the index page | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
230645,2 | Documentation: Add QtMultimediaWidgets | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
230646,2 | Documentation: Fix Qt11Extras | 5.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
233092,2 | shiboken/doc generator: Search snippets with to suffix "py" first | 5.11 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
234539,2 | ApiExtractor manual: Remove deprecated sphinx config key html_use_smartypants | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
234655,3 | shiboken: Document the smart-pointer-type | dev | pyside/pyside-setup | Status: MERGED | -2 | 0 |
234775,2 | shiboken: Fix command line help | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
234776,2 | shiboken: Update documentation of the command line options | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
257982,3 | shiboken: Move the Api extractor documentation into shiboken | 5.12 | pyside/pyside-setup | Status: MERGED | +2 | 0 |