aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/abstractmetafield.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move the shiboken-generator source aroundFriedemann Kleint2025-11-241-251/+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: Fix clang-tidy warning about using std::any_of instead of loopsFriedemann Kleint2024-06-241-11/+8
| | | | | Change-Id: Ic85973e29870456bf422a3ac75fd9d68524ad886 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Fix clang-tidy warning [performance-noexcept-move-constructor]Friedemann Kleint2023-09-191-2/+2
| | | | | | | | | Add noexcept, fixing: warning: move assignment operators should be marked noexcept. Pick-to: 6.6 6.5 Change-Id: I4d1244d07bdb88fafb8e67158cfdd4c53119c8b3 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Make some TypeEntry query functions free functionsFriedemann Kleint2022-11-171-1/+1
| | | | | | | | | | | Some query functions like TypeEntry::typeSystemTypeEntry() search in the hierarchy, starting with "this". This cannot be ported to smart pointers, so the functions are changed to be free functions where the first element has to be passed in. Change-Id: I3122b648ad499a2236577f6a101e8637a2f87d55 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix warnings about unused parameters in codeFriedemann Kleint2022-09-261-1/+1
| | | | | | Pick-to: 6.3 6.2 Change-Id: Ie120284b290d22f2786591955465e0334555e658 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/+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-1/+5
| | | | | | | | | | 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: Rewrite some helpers in terms of QStringViewFriedemann Kleint2021-10-281-1/+1
| | | | | | | | | | This is a prerequisite for refactoring functions qualifying argument default values, allowing them to operate on substrings. Task-number: PYSIDE-1691 Pick-to: 6.2 Change-Id: I5b368fdfe162ecc1a69a3958ed21d3563a05e1b0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Add opaque containers for C++ sequence containersFriedemann Kleint2021-09-241-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a class that directly wraps a C++ sequence container, allow for modifying them. For all instantiated containers, generate a special (sequence) type that wraps the C++ container directly. For example, it will be accessible as a QList_int. This is achieved via providing a template for a type private that relies on a conversion traits template for conversion. Only the conversion traits specialization code needs to be generated. Use cases: - Allowing for modifying Fields of such container types (non-owning) - Pass it into functions taking such containers instead of converting back and forth from a PyList (constructed in Python, owning) [ChangeLog][shiboken6] Support for opaque C++ sequence scontainers has been added, allowing to pass a wrapped C++ container directly instead of converting it back and forth from Python sequences. Task-number: PYSIDE-1605 Change-Id: I49d378eb1a0151730d817d5bdd4b71a7c3b5cdda Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Disable generation of array fieldsFriedemann Kleint2021-06-211-1/+2
| | | | | | | | | | There is no Python -> C++ conversion for primitive fields yet and it and it seems to be not easily possible to bind an T&operator[](int) so that an assignment foo.array[3] = 5 works. Task-number: PYSIDE-1602 Change-Id: Ifd24ec984b3f71db6e486d959cf635116b9bbf95 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Move C++ access specifiers into a global enumFriedemann Kleint2021-02-171-2/+29
| | | | | | | | | | | | | | | | | | | | | 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: Add support for a snake case typesystem attributeFriedemann Kleint2020-12-071-0/+23
| | | | | | | | | | | | | Add a snake case attribute to type system, complex type entry, function type entry as well as to function and field modifications. Add a function definitionNames() to AbstractMetaFunction/Field returning the names under which the function/field will be registered. Change the code writing the registration accordingly. Fixes: PYSIDE-1441 Change-Id: I178390bb80fa25aad9f8a56e99e4cc70064178eb Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Refactor field modificationsFriedemann Kleint2020-12-021-5/+2
| | | | | | | | | | | Decouple class FieldModification from the base class Modification since it does not need its attributes and turn in into a value class using QSharedDataPointer for consistency with FunctionModification. Remove some unused code and simplify removed handling. Change-Id: I9997559acd529bd070df5ff84610fe75c74a71a5 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Fix field modificationsFriedemann Kleint2020-12-021-12/+40
| | | | | | | | | | | | | | | The logic was only partially present, neither removal of getter/setter nor renaming had any effect. Rewrite the code to resemble that of AbstractMetaFunction (adding function applyFieldModifications()) Move some check functions from the generators to AbstractMetaField/Type. Add tests in libsample. Change-Id: Ib29d4e37db51f122b46702cb5d96b13da6d0f224 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: Port AbstractMetaField to use QSharedDataPointerFriedemann Kleint2020-11-101-38/+94
| | | | | | | | | | 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: Split the abstractmetalang headers and sourcesFriedemann Kleint2020-11-061-0/+132
Split out enums, fields and functions. Only AbstractMetaClass remains in abstractmetalang.h. Change-Id: I49846f92fafc5969d83aa4a1767eb4ac23f39d1c Reviewed-by: Christian Tismer <tismer@stackless.com>