aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/tests/testaddfunction.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move the shiboken-generator source aroundFriedemann Kleint2025-11-241-522/+0
| | | | | | | | | THIS COMMIT WAS GENERATED BY A SCRIPT Task-number: PYSIDE-962 Task-number: PYSIDE-1587 Change-Id: I58b05c3d05606efb6303193f2d7f907a0ab5741b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken6: Port to Qt include styleFriedemann Kleint2025-03-271-1/+1
| | | | | | | | | Replace the Qt forwarding headers by the .h files. This brings down the dependency list by approx 6%. Pick-to: 6.9 Change-Id: Iaa57400fd20600b940119a6016041b885a68d207 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Introduce more latin1 literalsFriedemann Kleint2024-02-131-22/+19
| | | | | | | | Removes a few QLatin1StringView. Task-number: PYSIDE-2537 Change-Id: I2270270c6011e43218034c9cd3a195f1f08c7ed3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Port the MetaClass::find*() helpers to QAnyStringViewFriedemann Kleint2023-11-271-22/+22
| | | | | | Task-number: PYSIDE-2537 Change-Id: I7d9c160b4b8c46854b11722c05510da766dcc3f5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Port from QSharedPointer to std::shared_ptrFriedemann Kleint2023-01-051-37/+37
| | | | | | | 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-22/+22
| | | | | 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-4/+4
| | | | | | | | | 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 AddedFunction from modificationsFriedemann Kleint2022-09-051-3/+3
| | | | | | Task-number: PYSIDE-2025 Change-Id: I34b6692e4e61dd6c03207ef60a794fee01bf675e 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: Extract class CodeSnip into separate filesFriedemann Kleint2022-05-171-0/+1
| | | | | | Change-Id: Iff46540cdb764d4caa2efad26cc5e28347cef54f Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Split the typesystem headerFriedemann Kleint2022-05-171-1/+2
| | | | | | | | 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-22/+27
| | | | | | | | | | 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>
* shiboken6: Refactor AbstractMetaClass::findFunction[s]() to use QStringViewFriedemann Kleint2022-04-251-10/+10
| | | | | | | | | UTF-16 string literals can then be passed as search strings. Pick-to: 6.3 6.2 Task-number: QTBUG-98434 Change-Id: Id3ce2934840ec56b3e2c4e070ed47321a264afa9 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Refactor AbstractMetaClass::findClass() to use QStringViewFriedemann Kleint2022-04-251-12/+12
| | | | | | | | | UTF-16 string literals can then be passed as search strings. Pick-to: 6.3 6.2 Task-number: QTBUG-98434 Change-Id: I2ce9f3b44b704a24c01249c60e8e7a5a01ab38ba Reviewed-by: Christian Tismer <tismer@stackless.com>
* Migrate from QLatin1String to UTF-16 string literalsFriedemann Kleint2022-04-251-16/+16
| | | | | | | | | | Use the QStringView overloads of the comparison functions in order to minimize merge conflicts after the deprecation of QLatin1String in 6.4. Task-number: QTBUG-98434 Pick-to: 6.3 6.2 Change-Id: Ia0df398ab8f3e61a0b629971ccbec2273a78499b Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6/tests: Fix a few warnings by clang and type system parsingFriedemann Kleint2022-04-071-2/+0
| | | | | | Pick-to: 6.2 Change-Id: Id4d26793bd17e1f6597e815603a3adb2262dad10 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Refactor the class function queriesFriedemann Kleint2022-04-071-1/+1
| | | | | | | | | | | Change the meaning of FunctionQueryOption::Constructors to "constructor except move/copy" since that is what is desired in most cases. Add FunctionQueryOption::AnyConstructor for the old purpose. Pick-to: 6.2 Change-Id: I600b02513b9b9e72d7cbd60e22cda7549133ab39 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Port code to use size() instead of count() of Qt containersFriedemann Kleint2022-03-171-15/+19
| | | | | | | | | | | count() will be deprecated. Fix some integer types in loops and modernize code in changed lines. Pick-to: 6.2 Change-Id: Idf21927661ea6c8866ee36e7c623043271e21620 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Move C++ access specifiers into a global enumFriedemann Kleint2021-02-171-3/+3
| | | | | | | | | | | | | | | | | | | | | Extract the AcessPolicy enum from the code model into a global enum and remove the access specifiers from AbstractMetaAttributes. AbstractMetaField and AbstractMetaEnum get access()/setAccess() functions and no longer need to inherit AbstractMetaAttributes which removes the attributes that do not apply to them. AbstractMetaFunction gets access()/setAccess() functions, too, and handling for remembering the original access before modifications. AbstractMetaAttributes::originalAttributes can then be removed since it is not used otherwise. Simplify the code accordingly. Change-Id: Ie4529fc753f127975b5c56ee07b27419802361d6 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Move the function/operator query enumerations out of ↵Friedemann Kleint2020-12-101-1/+1
| | | | | | | | | | | AbstractMetaClass This makes it possible to use them in cppgenerator without converting to uint. Pick-to: 6.0 Change-Id: Ice31487d0d053446988f896b4967fa83c656a0d3 Reviewed-by: Christian Tismer <tismer@stackless.com>
* 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>