aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/tests/testaddfunction.cpp
Commit message (Collapse)AuthorAgeFilesLines
* shiboken6: Remove deprecated typesystem tagsFriedemann Kleint2020-12-021-14/+14
| | | | | | | | | | | <remove> and <access> were deprecated in favor of attributes on the functions in PySide2. Similarly for <rename>, but it is still used as a child of <modify-argument>. Leave this usage in place, but add parsing of the rename attribute to <modify-argument>. Change-Id: I8e80ba13a3e4af1df0448bd0de034d242a9fdeb4 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Store AbstractMetaFunction using a QSharedPointerFriedemann Kleint2020-11-301-19/+20
| | | | | | | | | | | | | | | | | | 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>
* shiboken6: Port Modifications to use QSharedDataPointerFriedemann Kleint2020-11-121-1/+1
| | | | | | | | For caching in AbstractMetaFunction, they should be lightweight to copy around. Change-Id: Ic54293fcaf25ffe05f6930111870b2546f907d17 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: Replace AddedFunction::TypeInfo by TypeInfoFriedemann Kleint2020-11-091-39/+68
| | | | | | | | | | | | | | | | | | AddedFunction::TypeInfo was a stripped-down version of the code model's TypeInfo with its own, simplified parser. Replacing it by TypeInfo allows for removing the parser code and the entire AbstractMetaBuilderPrivate::translateType(AddedFunction::TypeInfo) branch. The more powerful TypeParser from the code model can then be used, allowing for more complex types in <add-function> or <declare-function>. As a drive by, replace the AddedFunction constructor by a static factory function, allowing to pass up parse errors. Change-Id: I33ad19e9b5ed30bd27898afe771401ddc98c8c73 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Add a new parser for AddedFunction parametersFriedemann Kleint2020-11-091-1/+41
| | | | | | | | | | | Observe' <' (templates), '{' (initializer lists), '[' (array dimensions) and '(' (initialization, function pointers) when splitting the parameter lists of added functions. Add a test. Change-Id: I8cdc135a2daceab5587c4b5545ed38f0a022b5f8 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Split the abstractmetalang headers and sourcesFriedemann Kleint2020-11-061-0/+1
| | | | | | | | 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/+467
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>