aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/tests
Commit message (Collapse)AuthorAgeFilesLines
* Move the shiboken-generator source aroundFriedemann Kleint2025-11-2477-7386/+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>
* Extend target triplet test by aarch64-poky-linuxFriedemann Kleint2025-11-211-1/+7
| | | | | | | Task-number: PYSIDE-3235 Task-number: PYSIDE-3105 Change-Id: If2a30172bdb5544d221e5cb713ec9336600c18cc Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Add a triplet classFriedemann Kleint2025-11-211-24/+14
| | | | | | | | | | | Extract the architecture/platform information from compilersupport.cpp into a separate Triplet class which can be tested independently and is not tied to the shiboken logic (initialization to host defaults, etc). As a result, compilersupport.cpp becomes much cleaner. Task-number: PYSIDE-3105 Change-Id: I3ea709a02184c73814dc34686be75017fa1391fa Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6/DocGenerator: Improve handling of missing detailed descriptionsFriedemann Kleint2025-09-172-4/+3
| | | | | | | | | | | | | | Refactor the functions to extract brief/detailed texts of the qdoc parser to return a pair of strings and do extended checking for space and empty elements. Add conditions checking on it to the doc generator. Adapt the test which had characters outside elements in the description. Pick-to: 6.10 6.9 6.8 Task-number: PYSIDE-1106 Change-Id: I9447270ba4280d0e6e42c3ebe9f76c332581dd60 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Use the C-string functions from namespace std, consistentlyFriedemann Kleint2025-09-021-1/+1
| | | | | | | | | Complements 5608c60f47f6c39a6c1dee5fb165c6d70bd1ee3f. Task-number: PYSIDE-3171 Pick-to: 6.9 6.8 Change-Id: I57f0d8bbd8d0f82367f03d0f55297e74361c44da Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken6: Add platform version to the triplet parsingFriedemann Kleint2025-07-221-6/+26
| | | | | | | | | Complements 244b5dd5e1869ea85c5b78d27259965f7ca2c7bb. Task-number: PYSIDE-3105 Task-number: PYSIDE-2352 Change-Id: I0cb197a1683b8a4d5a7c7babbfc900180005a723 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Add a triplet parser and triplet builder with testFriedemann Kleint2025-06-272-0/+79
| | | | | | Task-number: PYSIDE-3105 Change-Id: I13faf4343705e6c1f636784da0cc3e105390b012 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Port to Qt include styleFriedemann Kleint2025-03-2771-86/+122
| | | | | | | | | 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: Refactor logic for determining constructabilityFriedemann Kleint2025-02-122-0/+85
| | | | | | | | | | | | | | | | | | | | Introduce some bitfields to store whether a class is default/copy constructable and set those in fixFunctions() instead of half-duplicating the logic in the query functions, leading to wrong values being returned for some cases. Move the code from AbstractMetaBuilder into AbstractMetaClass::fixFunctions() and make helper functions private. Add a test with some cases. [ChangeLog][shiboken6] shiboken's auto-detection of default/copy constructibility has been improved to take further information from libclang into account. Task-number: PYSIDE-3004 Change-Id: I6beff5b1fa25403b6b5fc66c94a7d814acdf26aa Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix trailing empty linesFriedemann Kleint2024-12-1314-19/+0
| | | | | | Pick-to: 6.8 Change-Id: I1a5964463f703ade0657816cb974206355a5ae5b Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Documentation: Adapt paths for 6.8Friedemann Kleint2024-09-051-1/+6
| | | | | | | | | Adapt to qttools/c51980bb0d9658f2ade4de1900d07b08e88cb52d. Task-number: QTBUG-77650 Task-number: PYSIDE-2620 Change-Id: Icc083c9b3d768093f45caa5d7a3c54aec5eb2d4f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Improve formatting of function signaturesFriedemann Kleint2024-08-011-1/+1
| | | | | | | | | | Do not add space before parameter names in case of pointers/references, for example: "foo(const QString & name)". This mainly affects error messages and comments in generated code. Pick-to: 6.7 Change-Id: I1c00d9b731206e1a24b3d25689851276596121be Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Fix static analysis warningsFriedemann Kleint2024-06-241-2/+2
| | | | | | | | | | | | | | | | | | - Initialize variables - Use auto * - Use const references to prevent copies - Remove const from function returns - Remove repeated return types - Fix else after return/throw - Make functions const/static where appropriate - Add missing override - Fix some invocations of static methods - Fix some int types (qsizetype) to avoid lossy conversions - Minor cleanups - Remove some macros Change-Id: I414b8451703b136f135383289de49e743e84fb3a Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken: Prepare for [[nodiscard]] QFile::openFriedemann Kleint2024-04-191-1/+1
| | | | | | | | Check the return value. Pick-to: 6.7 Change-Id: Iccbdbc033e25ee997c3d0904d8af0903c0dc319e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Extract common C++ function attributesFriedemann Kleint2024-04-171-3/+3
| | | | | | | | | | | | | | | | Extract attributes common to C++ functions from AbstractMetaFunction's attributes to a flags type in codemodel_enums.h for re-use in AbstractMetaFunction, FunctionModelItem and AddedFunction. A lot of boolean setters and getters can then be removed and the flags easily transferred from code model to the meta language code. Task-number: PYSIDE-2602 Pick-to: 6.7 Change-Id: I9da1bb0d70051cd6bb3113290e8ccedfe4d13908 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: Add a test for static constexpr fieldsFriedemann Kleint2023-12-192-0/+40
| | | | | | | | | They frequently occur in Qt 6.7. Pick-to: 6.6 Task-number: PYSIDE-2497 Change-Id: Ia12951dbe0046d2ae95f67b1f4272bba060152c1 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Port more strings constants to latin1Friedemann Kleint2023-12-041-1/+1
| | | | | | Task-number: PYSIDE-2537 Change-Id: I5e8f4b46c69a39f1a85a0186c2e50b2169aa9cc9 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix usages of QLatin1String (deprecation candidate)Friedemann Kleint2023-11-292-6/+6
| | | | | | | | | Use QLatin1StringView or literals. Task-number: PYSIDE-2537 Change-Id: I03cb9ae80dacd84da9e53648dd179ad79e9189b1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Remove some further uses of QStringLiteralFriedemann Kleint2023-11-294-28/+28
| | | | | | Task-number: PYSIDE-2537 Change-Id: Ie71b17eec385b31842d6693b3492db565d479fd0 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Port the MetaClass::find*() helpers to QAnyStringViewFriedemann Kleint2023-11-2732-217/+217
| | | | | | Task-number: PYSIDE-2537 Change-Id: I7d9c160b4b8c46854b11722c05510da766dcc3f5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Correctly register smartpointer signaturesFriedemann Kleint2023-05-112-9/+9
| | | | | | | | | | | Drop the space before the closing bracket (no longer required in C++) which is causing signatures mismatches when using it signals. Pick-to: 6.5 Task-number: PYSIDE-2316 Change-Id: Ia460a0868454cc7a2a41e82ef921e50a40fcc45d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Fix passing static class fields as enum default valuesFriedemann Kleint2023-05-101-0/+12
| | | | | | | | | | | | | | | | Occurs in Qt 6.6: class QNativeIpcKey { enum class Type { SystemV = 0x51, PosixRealtime = 0x100, Windows }; static constexpr Type DefaultTypeForOs = Type::Windows ... QNativeIpcKey(Type type = DefaultTypeForOs) }; Pick-to: 6.5 Change-Id: Icf9abdd9ebe24eb4e1d145e65b27496545e327ef Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6/clang: Fix build with clang 16Friedemann Kleint2023-04-281-2/+1
| | | | | | | | | | | | clang 16 returns more elaborated types instead of fully qualified type names. Qualify elaborated types when retrieving the type name. [ChangeLog][shiboken6] Support for libclang version 16 has been added. Task-number: PYSIDE-2288 Pick-to: 6.5 5.15 Change-Id: Ibd428280180967f11d82a72159e744c016afc927 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Fail template test instead of crashingFriedemann Kleint2023-04-121-0/+1
| | | | | | | | | The class is not found by Clang 16. Pick-to: 6.5 6.2 5.15 Task-number: PYSIDE-2288 Change-Id: If7c7a29417d083645ddf2e9fd206a09e47401833 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add license headers to cmake filesFriedemann Kleint2023-02-161-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Task-number: QTBUG-105718 Task-number: QTBUG-88621 Change-Id: I98bd2e80f182d8bf7aef6b633f37a428e2dac69b Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* shiboken6: Port from QSharedPointer to std::shared_ptrFriedemann Kleint2023-01-0534-323/+323
| | | | | | | 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>
* Clean up include statementsFriedemann Kleint2022-12-191-22/+23
| | | | | | | | | | | - Remove some unused include statements - Replace C-headers (string.h) by the C++ versions (cstring) - Use WIN32_LEAN_AND_MEAN for windows.h Task-number: PYSIDE-2155 Change-Id: I8085e36f336d227218abb6c06cdd52d24c0761f4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove remaining Q_NULLPTRFriedemann Kleint2022-12-071-1/+1
| | | | | | | | Pick-to: 6.4 6.2 Change-Id: I80511f42164de4494371c9016ee745e3da0493ee Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Use smart pointers for AbstractMetaClass instancesFriedemann Kleint2022-12-0631-270/+269
| | | | | Change-Id: I101ca8ceea6ffa63ca8bd03e2e9adf7531cb8f80 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Build system: Use modern form of finding and linking Qt librariesFriedemann Kleint2022-11-291-1/+1
| | | | | | | Pick-to: 6.4 Task-number: PYSIDE-962 Change-Id: I91aed62a8e14bbc1101b4f23e25f57a5d6bca173 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken6: Use smart pointers for the TypeEntry classesFriedemann Kleint2022-11-1712-40/+39
| | | | | | | | | | TypeEntry instances were previously stored and passed as raw pointers, which made it difficult to track ownership, particularly when synthesized classes were added. Change it to use QSharedPointer. Change-Id: I3612efbc5d467ebeac9aa5dda86c7439bbd03ddd Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Make some TypeEntry query functions free functionsFriedemann Kleint2022-11-171-4/+4
| | | | | | | | | | | 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>
* shiboken6: Fix coding style regarding pointers (Type* v -> Type *v)Friedemann Kleint2022-11-1433-194/+194
| | | | | | | | | 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: Port some loop variables to qsizetypeFriedemann Kleint2022-10-131-1/+1
| | | | | | | | Where possible, used range-based for. Otherwise, use qsizetype for loop variables. Change-Id: I4773bee8468ce73722656ec73845369b7d40d4cd Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Test that the typedefs of C++ 11 integer types are seenFriedemann Kleint2022-10-062-1/+42
| | | | | | | | | Complements 92943cbb530edb4fd8b7292b3b0ea964d7a6fdde. Pick-to: 6.3 6.2 Change-Id: I5bca73a1f00727b21e56ac3512e8f818c8d534da Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Match function modifications by unresolved signature as wellFriedemann Kleint2022-09-301-1/+2
| | | | | | | | | | | | | Store the unresolved signature from the code model as an additional field in AbstractMetaFunction. Add a function modificationSignatures() to return a list of signatures to be matched against the modifications. [ChangeLog][shiboken6] The signatures for function modifications now also allow for specifying unresolved types. Change-Id: I258c4ff2ddf87542098568ee01ca4f444afd05ce Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Clean up includesFriedemann Kleint2022-09-2116-0/+25
| | | | | | | | | 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: Refactor CustomConversionFriedemann Kleint2022-09-091-30/+30
| | | | | | | | | | | | | - Split source code from typesystem.cpp. - Move class TargetToNativeConversion out of CustomConversion, enabling forward declarations and shorter code. - Remove private classes CustomConversionPrivate and TargetToNativeConversionPrivate. - Store TargetToNativeConversion by value instead of pointer in the list. Change-Id: I1530637c639c760043e38344f76384b77788644d Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Fix documentation injection for added functions with parameter namesFriedemann Kleint2022-09-062-0/+29
| | | | | | | | | | | Documentation modifications were matched by function signatures, which failed for added function signatures with parameter names (@). To fix this, store documentation modifications in AddedFunction similar to what is done for normal modifications. Task-number: PYSIDE-2025 Change-Id: I0b3a8c2a066c028da6feb394905510892e85e47d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Refactor Handling of CustomConversionFriedemann Kleint2022-09-062-9/+17
| | | | | | | | | | | | | | | | | CustomConversion can appear in PrimitiveTypeEntry, ContainerTypeEntry and ValueTypeEntry. Move the field from the base class TypeEntry there. The deprecated QString targetConversionRule() was only implemented for ValueTypeEntry; move it from the base class TypeEntry there. In the original code, CustomConversion was stored as a raw pointer in TypeEntry. This is bad since TypeEntry are cloneable. Use a QSharedPointer to prevent crashes. Change-Id: Ia74219671bbd5792398f9711b4a020f5c9825b1b Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Split AddedFunction from modificationsFriedemann Kleint2022-09-051-3/+3
| | | | | | Task-number: PYSIDE-2025 Change-Id: I34b6692e4e61dd6c03207ef60a794fee01bf675e Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Remove most uses of class Indentation for formattingFriedemann Kleint2022-08-261-7/+4
| | | | | Change-Id: I5dfa2e1d538cffb00106b8f7621b9d142aca8ad8 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Implement the spaceship comparison operator of C++ 20Friedemann Kleint2022-06-213-4/+35
| | | | | | | | Synthesize all comparison operators if one is found in the code model. Task-number: QTBUG-103757 Change-Id: I78fbcd93bc4cd172266f9dd0dbb2ebcf3a8bb7f2 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Use SPDX license identifiersLucie Gérard2022-05-2771-1917/+142
| | | | | | | | | | | 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-174-0/+4
| | | | | | 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-1717-17/+28
| | | | | | | | 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: Add an attribute for explicitly defining the functions to be ↵Friedemann Kleint2022-05-112-0/+34
| | | | | | | | | | | generated [ChangeLog][shiboken6] It is now possible to specify a list of functions to be generated instead of removing undesired functions. Fixes: PYSIDE-1764 Change-Id: I16f40eb99b0f4da0afb3b100ac24bb5e877dfb30 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Remove deprecated QLatin1StringFriedemann Kleint2022-04-2521-138/+234
| | | | | | | | | | 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-259-42/+42
| | | | | | | | | 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>