aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/samplebinding/sample_test.py
Commit message (Collapse)AuthorAgeFilesLines
* shiboken6: Enable specifying template specializations as primitive typesFriedemann Kleint2025-05-231-0/+7
| | | | | | | | | | | | Add search for the instantation name when resolving types along with a test. [ChangeLog][shiboken6] Template specializations like "std::optional<int>" can now be specified as primitive types with converter code. Change-Id: I20845b21ede1101cb3015de90555b74368f686e9 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Handle move only typesFriedemann Kleint2025-02-121-0/+7
| | | | | | | | | | | | Generalize the concept which so far has been only used for std::unique_ptr. [ChangeLog][shiboken6] The handling of move only value types are has been improved Task-number: PYSIDE-3004 Change-Id: Ic509ceec7d78f4a576d1963724c898ed99110078 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Python-3.10: Allow the new syntax for Python 3.9Christian Tismer2024-06-201-0/+1
| | | | | | | | Add a future statement to all Python source files. Task-number: PYSIDE-2786 Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* shiboken tests/samplebinding: Fix flake8 warningsFriedemann Kleint2024-03-131-2/+1
| | | | | | | | | - Remove * imports - Remove a hidden test that was non-functional Pick-to: 6.6 6.5 Change-Id: I34c98ef81d0ebe11b0813670149c00cfcff4eb28 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Add experimental support for rvalue referencesFriedemann Kleint2023-08-011-0/+21
| | | | | | | | | | | | | | | | Enable functions taking rvalue references if they are user-defined in some way. Enabling by default is not done since there are cases in which several overloads exist (QSqlQueryModel::setQuery(QSqlQuery)). In these cases, they should not be part of the candidate list. [ChangeLog][shiboken6] Experimental support for rvalue references has been added. Task-number: PYSIDE-2394 Task-number: PYSIDE-1790 Change-Id: Ie2eb60ef19ddac321126b64cd0c35913bd805b48 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PyEnum: Remove the now unreachable test cases for old enumsChristian Tismer2023-06-191-26/+0
| | | | | | | Task-number: PYSIDE-1735 Change-Id: I51e68c50872f1d1254218ae7556ba607f73c4ea9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PyEnum: Update docs and rename the optionChristian Tismer2023-06-161-3/+3
| | | | | | | | | | | | | The new Enum implementation can no longer be switched off. Individual features can still be deselected with the environment variable PYSIDE6_OPTION_PYTHON_ENUM which had the name PYSIDE63_OPTION_PYTHON_ENUM before. This change is meant for PySide 6.6 . Task-number: PYSIDE-1735 Change-Id: Iae5b7a9d42a0d7b005dbba20201a80713ef79be9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PyEnum: Remove the old duplication of Enums in the enclosing scopeChristian Tismer2022-06-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When implementing Python enums, the behavior of old Qt enums was copied: Every enum was also inserted into the enclosing scope. This patch removes that for two reasons: - it is inconsequent to keep an old quirk when we have all enums renewed so much - It is more consistent compared to our competitor - it is a prerequisite to implement efficient lazy initialization PROBLEM: Many constants (about 110) are no longer recognized, for instance `Qt.AlignLeft` should be `Qt.AlignmentFlag.AlignLeft`. The question is if that can be fixed easily in C++, or if the file mapping.py should get ~100 new fixes? SOLUTION: We allow the old enums, but tell nobody that they continue to work. They also are not advertized in the PYI files. [ChangeLog][PySide6] The duplication of enum values into the enclosing scope, allowing to write Qt.AlignLeft instead of Qt.Alignment.AlignLeft, is still implemented but no longer advertized in PYI files or line completion. Task-number: PYSIDE-1735 Change-Id: I79a90d08f2a5a3a069fa551e60d609ecad718239 Pick-to: 6.3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-271-29/+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: Test nullptr_tFriedemann Kleint2022-04-051-0/+4
| | | | | | | | | Testing the support introduced by 3c2ef04c9eade4226f139064c6c45cb4819834e0. Task-number: PYSIDE-854 Change-Id: I2d7276baf2c81e24f3f7389448352541a78e18bd Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Fix comparison operators in namespacesFriedemann Kleint2022-03-221-0/+5
| | | | | | | | | | | | | | | | Change qtbase/e7fd9a9f4ab1fcc017174d6d7760c731857b89fc introduced some mixed flag operators in Qt which caused compile errors. They should be ignored by traverseOperatorFunction() since they cannot be attributed to any class, but traverseOperatorFunction() was only called for the global namespace. Fix by calling it for operator functions in namespaces as well. Task-number: QTBUG-99948 Pick-to: 6.2 Change-Id: I57419563f10f1a0d33aea027a166119f969bca5d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Add support for std::wstringFriedemann Kleint2021-09-291-0/+1
| | | | | | | | | | | | | Add a new header/source with conversion functions for std::string/wstring. This avoids calling std::string::c_str() which might do an allocation. [ChangeLog][shiboken6] Support for std::wstring has been added. Task-number: PYSIDE-1660 Task-number: PYSIDE-1666 Change-Id: If2b0fd1bd14b71d0c576921a889ac7e28ead00eb Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Add tests for the std::string conversionFriedemann Kleint2021-09-291-0/+7
| | | | | | | Task-number: PYSIDE-1660 Task-number: PYSIDE-1666 Change-Id: I1190a0ae074401f7db8883d83b51d2db79ba708f Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Add test for constantsFriedemann Kleint2021-06-181-0/+4
| | | | | | | Task-number: PYSIDE-186 Change-Id: Ic4ba7f22bead8418a18dec100a77e3befe038a76 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Switch from os.path to pathlib.Path, systematic test changesChristian Tismer2021-02-081-1/+2
| | | | | | | | | | | | | | | | | | This patch does the systematic changes on all tests. Note that there was a bug in principle: os.path was used without importing os.path This worked through the way how the os module initializes itself, but you always will find the explicit import in the python library. But the problem is going away anyway after the transition to pathlib.Path :) Change-Id: I95144d7f9bb07a38376c3aa428df663f2e64bcb7 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Rename shiboken2 to shiboken6Friedemann Kleint2020-10-281-0/+84
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>