aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/generator/shiboken/headergenerator.cpp
Commit message (Collapse)AuthorAgeFilesLines
* shiboken6/ApiExtractorResult: Use const AbstractMetaClass * for the class listFriedemann Kleint2020-12-221-3/+3
| | | | | | | | | | | Add the missing overloads of AbstractMetaClass::findClass() and adapt some types. Change-Id: I65851248b4b6a2e1d4f57fc58ecaf75fb4c00b29 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 6d25758babd8ccad4fbc7effe561c29cbd692434) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Introduce class ApiExtractorResultFriedemann Kleint2020-12-221-11/+15
| | | | | | | | | | | | | | | Separate the generators from ApiExtractor by introducing a class ApiExtractorResult storing the results of an ApiExtractor run. Move some query functions there. With that, some generator functions can already be made static by passing the ApiExtractorResult and OverloadData can be decoupled from the generator. Change-Id: Iaba3ebff4aecb722eec4a606423738260983d905 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit b9286bd08a4e7bf8f603e274c80cbd86cb9c1a4a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Store AbstractMetaFunction using a QSharedPointerFriedemann Kleint2020-11-301-6/+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>
* Replace QVector by QListFriedemann Kleint2020-11-251-3/+3
| | | | | | | | | | | | | | | | Change AbstractMetaClass::templateArguments() to return TypeEntries (const TypeEntry *) instead non-const. Remove redundant typedef OverloadData::MetaFunctionList. Use existing typedefs in some places. Add new typedefs for MetaObjectBuilder::EnumValues and AbstractMetaFunctionCList. Change-Id: Ia241b5fbe54d60ea57175fb1f6c844604e066a3d Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Introduce a new Text streamFriedemann Kleint2020-11-251-73/+58
| | | | | | | | | | | | | | | | | | | Add a new text stream wrapping QTextStream with built-in indent. This removes the need to have INDENT as a separate member variable or function parameter and to output it at the beginning of each line. It also makes it easier to factor out the write() functions since they no longer need the indent. Make the write* functions const where possible. The doc generator is left as-is for the moment. Rename the old Indentation to Indentation4 to avoid conflicts. Change-Id: I6866e7360df119859adeee567d2b18a37cb63a79 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Move further C++ check functions from the generators to MetaLang*Friedemann Kleint2020-11-171-1/+1
| | | | | Change-Id: I14fe14a2c7a5efff01dcd34bc1682cd8e264ab86 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Qualify the generator functionsFriedemann Kleint2020-11-161-7/+7
| | | | | | | Mark them as static or const where applicable. Change-Id: Ia8b9fd876c9b871163fd5af251ba8b31f337bd01 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Port AbstractMetaEnum/Value to use QSharedDataPointerFriedemann Kleint2020-11-111-24/+19
| | | | | | | | 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-6/+5
| | | | | | | | | | 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/+661
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>