aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/samplebinding/samplesnippets.cpp
Commit message (Collapse)AuthorAgeFilesLines
* shiboken tests: Fix test for user added constructorsFriedemann Kleint2023-10-101-0/+17
| | | | | | | | | | | | The test injected code to manipulate the overload number of the overload decisor and change values based on that which lead to unpleasant surprises when adding copy and move constructors. Spell it out to do some basic string parsing instead. Pick-to: 6.6 Task-number: PYSIDE-2479 Change-Id: I7a6fb9c8c22532a20711b4854f5c9b3b0d81d213 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Add __abs__, __pow__Friedemann Kleint2023-09-051-0/+9
| | | | | | | | | | | | Add mapping for non-operator functions that serve as special nb slots. [ChangeLog][shiboken6] It is now possible to add the special functions __abs__ and __pow__, enabling the use of abs() and pow() for numerical types. Task-number: PYSIDE-2446 Change-Id: Iff4b88ad927273df5688c7350c0f45bb7618f05b Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add some test for number protocol functionsFriedemann Kleint2023-08-311-0/+8
| | | | | | | | | | | Add a basic complex number based on std::complex with some number protocols (note the name Complex is already taken by a primitive type in libsample). Pick-to: 6.5 Task-number: PYSIDE-2446 Change-Id: Ie1427761c0048f57a02bc8d59c3181567ce3a199 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6 tests: Fix warning about unused variablesFriedemann Kleint2022-11-111-1/+1
| | | | | | | Pick-to: 6.4 Change-Id: Ibca923deadadc868edace34a4e310b77be000291 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Add a way to specify free functionsFriedemann Kleint2022-05-271-0/+20
Provide a way to add completely custom slots to the PyMethodDefs. For example, this allows handling writing variadic argument lists bypassing the overload decisor. Task-number: PYSIDE-1202 Task-number: PYSIDE-1905 Change-Id: Id8686e68e4c410dabbefb633b496c134deaab5ca Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>