aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside/pysidevariantutils.cpp
Commit message (Collapse)AuthorAgeFilesLines
* libshiboken: Split out PEP functions from sbkpython.hFriedemann Kleint2025-09-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libshiboken provides replacement functions prefixed "Pep" for functions missing from the limited API or appearing in future Python versions (pep384impl.h, bufferprocs_py37.h, pep384ext.h). This used to be included in the sbkpython.h header, which provides a sanitized Python.h. This patch removes the PEP headers from sbkpython.h header, requiring code using the replacement functions to explicitly include new headers (sbkpep.h, sbkpepbuffer.h). The generator automatically includes sbkpep.h for code snippet compatibility. The aim is to be able to identify code using the replacement functions. It is expected that the usage decreases over time as the Limited API versions are raised and more eplacement functions become obsolete. [ChangeLog][shiboken6] libshiboken's replacement functions providing functions missing from the limited API or appearing in future Python versions have been moved from sbkpython.h (providing a sanitized Python.h) to separate headers sbkpep.h and sbkpepbuffer.h (providing buffer API). This should not affect binding code as the generator includes the new headers, but may require adaption in client code using libshiboken/libpyside directly. Task-number: PYSIDE-3171 Change-Id: I5d79a40ba6755a80c8da99e4ddd6ef93463b4ddf Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix compilation with Python 3.14/raised limited API/PyObject parametersFriedemann Kleint2025-09-031-1/+1
| | | | | | | | | | Some macros (Py_INCREF/Py_TYPE) were reimplemented as functions, unearthing some type incompatibilities. Pick-to: 6.9 6.8 Task-number: PYSIDE-3147 Change-Id: If10bc5941d718d8845c7bbd5facf6021539aad34 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix crash checking base type for QObject* when checking QGraphicsObject ↵Friedemann Kleint2025-08-151-3/+5
| | | | | | | | | | | | | hierarchies Amends 6f996ff3439e69b3938e617135b266974802d5b1. Fixes: PYSIDE-3158 Task-number: PYSIDE-3115 Task-number: PYSIDE-3069 Pick-to: 6.9 6.9.2 Change-Id: I66bbc9d79d850c108411f9dcbe7e3090ad15b0b3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix QVariant conversion of Python classes inheriting QGraphicsProxyObjectFriedemann Kleint2025-06-061-2/+6
| | | | | | | | | | | | | | The check needs to be more fine-grained since Shiboken::ObjectType::getOriginalName() returns "QGraphicsObject*" for Python-derived classes, also. Amends f81fb9ee887d088e8988d743bb7cac4f781fff82. Pick-to: 6.9 Fixes: PYSIDE-3115 Task-number: PYSIDE-3069 Change-Id: I4589ec85075e712ed1c66acfce257ff41d965ec4 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Move some qvariant helper code into libpysideFriedemann Kleint2025-05-221-0/+212
Iron out some issues in the code: - The old code created a fast list from the list passed in but then did not use the fast API (PySequence_Fast_GET_ITEM(), etc) since it does not work with the limited API. Remove it. - For empty lists, an empty QStringList was returned since the helper isStringList() returned true. Change it to return an empty QVariantList. - Add a new function pyListToVariantList() which converts each item using the QVariant converter for use by QGenericItemModel Change-Id: If0b5cdf4055f8d586df56a8c98bc042f4bab6427 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>