aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/docparser.h
Commit message (Collapse)AuthorAgeFilesLines
* shiboken6/Documentation: Prominently display QML typesFriedemann Kleint2024-12-131-2/+8
| | | | | | | | | | | | | | | | | | | Previously the link to the QML types list (Qt web documentation) was automatically inserted into the last paragraph of the module description. This only had an effect when no PySide module description was present. Otherwise, it had to be manually added to the module description which was overlooked for some modules. To fix this, extend the module documentation obtained from the doc parsers by the URL to page and format it as a separate section preceding the class list. Remove the QML types from the PySide module descriptions. Pick-to: 6.8 Task-number: PYSIDE-1106 Change-Id: I0b107a81b239405c0258ecff924aef87472f13b0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Remove unused code from the doc parsersFriedemann Kleint2024-12-131-37/+0
| | | | | | | Pick-to: 6.8 Task-number: PYSIDE-1106 Change-Id: Ib276e2cb6c6d3db14e7c65e7e464dae4a5be3d8b Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6/Documentation: Return documention source file from the DocParser ↵Friedemann Kleint2024-09-261-1/+1
| | | | | | | | | | | (doxygen/qdoc) As a drive-by skip private fields in doxygen instead of quitting. Task-number: PYSIDE-2620 Task-number: PYSIDE-1106 Change-Id: Ieb488e6168d736aa1b11e2737eb118fdb3f485cd Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Extract global (non-added) function/enum documentationFriedemann Kleint2023-12-191-0/+2
| | | | | | | | | | Try to determine the name of the .webxml file in which the documentation is via include/doc file hint and write that to the globals page. Task-number: PYSIDE-1106 Change-Id: I8042d9122fa9037a602aadc2266d85d1f79f4fde Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* DocGenerator: Further preparations for generating global functions/enumsFriedemann Kleint2023-12-121-3/+7
| | | | | | | | | | | | | | | | QtDocGenerator::writeInjectDocumentation() previously had class and function as parameters and was used for class documentation (function == 0) as well as function documentation. Split it into separate functions for both cases such that class can be 0 in the function case for global functions. Remove the indentation, which appeared to be misguided. Add separate functions for querying the XPATH modifications. Task-number: PYSIDE-1106 Task-number: PYSIDE-2543 Change-Id: I78a25f100b810abb542d82be56c4473816bb8c82 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Fix some clang-tidy warningsFriedemann Kleint2023-09-201-1/+1
| | | | | | | | | | | | | | | | - narrowing conversion qsizetype->int - Repeating return type for default-constructed values - Make methods const - Add missing references - Use range-based for - Use Q_DISABLE_COPY_MOVE where applicable - Initialize variables - Remove unused function parameters Pick-to: 6.6 6.5 Change-Id: I65290fe2dab5283a5cbbf6f82c413c3cf294f1bd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Port from QSharedPointer to std::shared_ptrFriedemann Kleint2023-01-051-2/+3
| | | | | | | Task-number: QTBUG-109570 Change-Id: Iabdafb0a5ab211e32c1bbf7face78fd5102a49b9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Use smart pointers for AbstractMetaClass instancesFriedemann Kleint2022-12-061-3/+3
| | | | | Change-Id: I101ca8ceea6ffa63ca8bd03e2e9adf7531cb8f80 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Fix coding style regarding pointers (Type* v -> Type *v)Friedemann Kleint2022-11-141-2/+2
| | | | | | | | | As a drive-by, introduce some auto and streamline the code. Pick-to: 6.4 Change-Id: If84a3721a50b2e00b473ba78cba184f1a35d326b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Reorder headers containing typedefsFriedemann Kleint2022-11-111-1/+1
| | | | | | | | | | | | | | | - Split out Modifications/CustomConversions-related typedefs to separate headers customconversion_typedefs.h, modifications_typedefs.h - Move forward declarations of TypeEntries from typedatabase_typedefs.h to typesystem_typedefs.h - Rename TypeEntries to TypeEntryCList and add "C" to other lists containing const pointers following the shiboken convention. Pick-to: 6.4 Change-Id: Ic31872405778d794d85694386990b50edf42beec Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Documentation: Indicate enum typesFriedemann Kleint2022-11-081-0/+1
| | | | | | | | | Insert the base class into the WebXML doc string. Pick-to: 6.4 Task-number: PYSIDE-1735 Change-Id: I5b59df98f929c82112903bb316143b592c06e33e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Split the document modifications in ComplexTypeEntryFriedemann Kleint2022-09-051-0/+6
| | | | | | | | | | | | Split into function modifications (with signature) with a new accessor and let the old accessor return the class modifications only. Add a helper function DocParser::getDocModifications() to retrieve the modifications. Task-number: PYSIDE-2025 Change-Id: I1f8b3eb0cfa4b121910329cd76b0a67559d76fca Reviewed-by: Christian Tismer <tismer@stackless.com>
* Use SPDX license identifiersLucie Gérard2022-05-271-27/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: I065150015bdb84a3096b5b39c061cf0a20ab637d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6/Documentation: Replace XPath/Xquery usage for retrieving WebXML ↵Friedemann Kleint2021-12-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | docs by a parser shiboken used XPath expressions to extract the function descriptions from the qdoc-generated WebXML. With the deprecation of QtXmlPatterns in Qt 6, libxml/xslt was used for this. A major drawback is that libxml/xslt is unable to match entities in attributes which means functions taking parameters by const-ref could not be found. This required cumbersome workarounds involving repeated searches, which still were not sufficient to find all functions. To fix this, write a WebXML parser based on QXmlStreamReader that extracts the contents of a WebXML page into some simple data structures and use those for searching. On this occasion, also use the metafunction flags to correctly match binary operator functions. This reduces the number of functions for which no documentation can be found (from ~1100 to ~800 for the qtbase repository). From the remaining functions, ~230 are functions inherited from templates, which should at least be listed. Others are caused by qdoc not finding hidden friends. The remaining usages of libxml/xslt are the doxygen parser and the documentation modifications using XSLT. Task-number: PYSIDE-1106 Change-Id: I31c045ad42948afad884f40d5bbc8bee7555859e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Make more functions static using clang tidyFriedemann Kleint2021-01-231-6/+5
| | | | | | | | | Apply the fix created by clang tidy' -wreadability-convert-member-functions-to-static warning with some manual correction. Change-Id: I394bd96881fa25dbcb7a725b79d10395fcbb8676 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Store AbstractMetaFunction using a QSharedPointerFriedemann Kleint2020-11-301-2/+2
| | | | | | | | | | | | | | | | | | Store the list functions (global / class member) as a QList<QSharedPointer<const AbstractMetaFunction> instead of a raw pointer list. This makes passing around function lists easier and solves the memory leaks caused by mixing cloned and unmodified functions while collecting the overload lists in the generators. - Change the function signatures accordingly - Add a qSharedPointerConstCast() for non-const access. - Restructure the traversing of added functions in the AbstractMetaBuilder - Remove some unused typedefs and functions unearthed by the change Change-Id: I08a6c5243750e3eb3813bc3f7172899ad2b13e22 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Rename shiboken2 to shiboken6Friedemann Kleint2020-10-281-0/+134
Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I4cb5ee4c8df539546014b08202a7b1e98ed3ff07 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>