aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/doxygenparser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* shiboken6: Introduce more latin1 literalsFriedemann Kleint2024-02-131-4/+3
| | | | | | | | Removes a few QLatin1StringView. Task-number: PYSIDE-2537 Change-Id: I2270270c6011e43218034c9cd3a195f1f08c7ed3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Documentation/doxygen: Fix querying const functionsFriedemann Kleint2024-01-121-1/+1
| | | | | | | | | Remove space. Fixes: PYSIDE-2577 Pick-to: 6.6 Change-Id: I3921473260e8a5696cd6fd6b4055fac86cb597bd Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* DocGenerator: Further preparations for generating global functions/enumsFriedemann Kleint2023-12-121-1/+1
| | | | | | | | | | | | | | | | 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>
* Replace QPair by std::pairFriedemann Kleint2023-09-291-1/+1
| | | | | | Pick-to: 6.6 6.5 Change-Id: Ic64a2a2c162c54fbbfb6ddc5004ffe1944bfd37a Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@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-4/+4
| | | | | | | 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-1/+1
| | | | | 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-1/+1
| | | | | | | | | 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: Clean up includesFriedemann Kleint2022-09-211-0/+2
| | | | | | | | | Remove unused includes from headers; add includes to sources where needed. Change-Id: I05efd95a9340eaf42cc5d606e2aef97acdaf83c7 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* shiboken6: Split the document modifications in ComplexTypeEntryFriedemann Kleint2022-09-051-1/+2
| | | | | | | | | | | | 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: Split the typesystem headerFriedemann Kleint2022-05-171-1/+1
| | | | | | | | It was growing too large to be maintainable. Change-Id: I7d646fa92a08dd598d673c81668210c1b188b635 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Remove deprecated QLatin1StringFriedemann Kleint2022-04-251-32/+36
| | | | | | | | | | Introduce a compatibility header to provide the 6.4 API to 6.3 to reduce merge conflicts. Task-number: QTBUG-98434 Pick-to: 6.3 6.2 Change-Id: Iab3f9f894019b4135afa96b930325966348210d0 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Migrate from QLatin1Char to UTF-16 char literalsFriedemann Kleint2022-04-251-2/+2
| | | | | | | | | Preparing for the deprecation of QLatin1Char in 6.4. Task-number: QTBUG-98434 Pick-to: 6.3 6.2 Change-Id: I8bc92aa9f4e6dbfcb12d2025c5a1e760ab4f0d7f Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix documentation generationFriedemann Kleint2021-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The fuzzy checking introduced by 87efa57c6ddc1a8364b2ea4d9f909372d0af5cfc actually produced ambiguous matches like QStandardItemModel::insertRow(QStandardItem *), QStandardItemModel::insertRow(constd QList<QStandardItem *> &). Change this to be a 3 step process: First, try an exact type match. If that fails and there are arguments using const ref qualifications, try a fuzzy match. Check whether this produces a single match. Finally, try matching by argument count. As a drive-by, format qualifiers of template parameters like QList<QStandardItem *> correctly. Change the messages to report "Fallback used" instead of "Cannot find" if a fallback is found to make it easier to spot failures. Amends 87efa57c6ddc1a8364b2ea4d9f909372d0af5cfc. Pick-to: 6.2 Change-Id: I5b133274ae0f056e6901b0a66d385a270cabb9c9 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Replace placeholder formatting by string literalsFriedemann Kleint2021-07-291-1/+1
| | | | | | | It makes the code more readable and is faster. Change-Id: I75f2e427d2d46176690d9689c5129a63e867faa6 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Refactor class DocumentationFriedemann Kleint2021-04-281-2/+3
| | | | | | | | | | | | | | Replace the map by two fields of string type for detailed/brief and add accessors. Make the constructor explicit and fix all occurrences of implicit conversions. Change QtDocGenerator::writeFormattedText() to take a QString with the format instead of an instance of Documentation and add convencience functions writeFormattedBriefText() and writeFormattedDetailedText(). Change-Id: I4efaecc8cffeff16873fa3926c3f3b731b96bc5b Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Store AbstractMetaFunction using a QSharedPointerFriedemann Kleint2020-11-301-5/+5
| | | | | | | | | | | | | | | | | | 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>
* AbstractMetaFunction: Introduce private classFriedemann Kleint2020-11-111-0/+1
| | | | | | | Prepare it for caching the lists of function modifications. Change-Id: Icbe19be760a49278ed4af75534bc73d36f4b1a96 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Port QPropertySpec to use QSharedDataPointerFriedemann Kleint2020-11-111-1/+2
| | | | | | | | | | Change the client code to store it by value. Use a std::optional to replace the pointer. Replace the pointer QPropertySpec* stored in AbstractMetaFunction by a the index of the property in the enclosing class. Change-Id: Iffca9e0a6f311534ba001dc2b34bbf5ff7c01813 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Port AbstractMetaEnum/Value to use QSharedDataPointerFriedemann Kleint2020-11-111-3/+3
| | | | | | | | Change the client code to store it by value. For the various find() and traverseEnum() functions, use a std::optional to replace the pointer. Change-Id: Ie4e671bf95e569741fa3c9a399bfe239ceac0dec Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Port AbstractMetaField to use QSharedDataPointerFriedemann Kleint2020-11-101-5/+4
| | | | | | | | | | Fold AbstractMetaVariable into AbstractMetaField and use a QSharedDataPointer for it. Change the client code to store it by value. For the find() and traverseField() functions, use a std::optional to replace the pointer. Change-Id: Ibaa301b9aaae8851fcaa077327235cc5aaad7342 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Introduce a private class hierarchy for TypeEntryFriedemann Kleint2020-11-101-0/+1
| | | | | | | | | | | | | | | | | Move the data members of the TypeEntry classes to private classes, using convenience macros modeled after Qt's Q_D macro. The main motivation here is header hygiene and decoupling; typesystem.h was including a lot of classes. This requires moving some code around: - Move the debug formatting helpers of the TypeEntry classes from typedatabase.cpp to typesystem.cpp. - Move struct TypeRejection to typedatabase.h - Reorder typesystem.cpp in order of declaration. Change-Id: I24fe501d98940afd44caf75057cd6131cfbd6b6e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Split the abstractmetalang headers and sourcesFriedemann Kleint2020-11-061-0/+3
| | | | | | | | Split out enums, fields and functions. Only AbstractMetaClass remains in abstractmetalang.h. Change-Id: I49846f92fafc5969d83aa4a1767eb4ac23f39d1c Reviewed-by: Christian Tismer <tismer@stackless.com>
* Rename shiboken2 to shiboken6Friedemann Kleint2020-10-281-0/+237
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>