aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpysideremoteobjects
Commit message (Collapse)AuthorAgeFilesLines
* libpyside: Introduce a helper function for creating propertiesFriedemann Kleint2025-11-141-16/+12
| | | | | | | For use in QtRemoteObjects and Python bridges. Change-Id: Ica4d3c36cc87db958353d7d6de25806acdf5d8b7 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libpyside: Add qobjectType() to return the Python type QObjectFriedemann Kleint2025-10-011-10/+3
| | | | | | | | | | Set it directly instead of looking it up via converters, which is a step towards decoupling the converters from the per-interpreter types and saves dict lookups. Task-number: PYSIDE-3155 Change-Id: I31a71d1a9d02f1247e04c57de2c2901746221b4f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Replace PepType_GetSlot() by PyType_GetSlot()Friedemann Kleint2025-09-181-5/+7
| | | | | | | | | [ChangeLog][shiboken6] The helper function PepType_GetSlot() has been removed. PyType_GetSlot() should be used instead. Task-number: PYSIDE-2786 Change-Id: I72ba347588d720aecd5185adad6c503fde0c86b8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libshiboken: Split out PEP functions from sbkpython.hFriedemann Kleint2025-09-053-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Reduce usage of PyTypeObject::tp_nameFriedemann Kleint2025-09-054-5/+6
| | | | | | | | | | | | | | | | | | | | | | In the Limited API, PyTypeObject is an opaque struct, for which libshiboken provides a dummy definition. PyType_GetFullyQualifiedName() (stable API since 3.13) can be used as a replacement, but it returns a PyObject. Add a convenience function PepType_GetFullyQualifiedNameStr() similar to the existing PepType_GetNameStr() to return a C-string. Leave the 3.13 code commented out for the moment since it causes a crash. This does not cover occurrences of tp_name passed as strings to Python formatting functions using the %s placeholder since that can be replaced by the new %N/%T placeholder starting from 3.13. Task-number: PYSIDE-3171 Change-Id: I4a073872cd0d138b8d8c6aafb08ccb33451812ca Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Add PepModule_Add()Friedemann Kleint2025-09-031-1/+1
| | | | | | | | | | PyModule_AddObject() is deprecated in 3.13 in favor of PyModule_Add() (added to stable ABI in 3.13). Add a Pep function for it. Pick-to: 6.9 6.8 Task-number: PYSIDE-3147 Change-Id: If69739267a37def164cf5a0f1843eac226933e57 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add PepModule_AddType()Friedemann Kleint2025-09-031-1/+1
| | | | | | | | | | | | | PyModule_AddObject() is deprecated in 3.13. For adding types to a module, PyModule_AddType() can be used instead (added to stable ABI in 3.10). Add a Pep function for it. This requires adapting some type names in QML. Pick-to: 6.9 6.8 Task-number: PYSIDE-3147 Change-Id: I169a6b7071c780dd3c3ec2ddd0762dca6cacf067 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix compilation with Python 3.14/raised limited API/PyObject parametersFriedemann Kleint2025-09-032-8/+9
| | | | | | | | | | 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>
* Remote Objects: Fix valgrind warning about accessing freed memory (Python ↵Friedemann Kleint2025-09-031-1/+1
| | | | | | | | | | | | | <=3.10) The type name should be a global, static string. Amends 19abd816e73bebdd489408d0a3b7676822bff39c. Task-number: PYSIDE-862 Pick-to: 6.9 Change-Id: Id1c3de06fff71f35aa6d86be7759e3403204f7e6 Reviewed-by: Brett Stottlemyer <brett.stottlemyer@gmail.com>
* Use the C-string functions from namespace std, consistentlyFriedemann Kleint2025-09-021-3/+6
| | | | | | | | | Complements 5608c60f47f6c39a6c1dee5fb165c6d70bd1ee3f. Task-number: PYSIDE-3171 Pick-to: 6.9 6.8 Change-Id: I57f0d8bbd8d0f82367f03d0f55297e74361c44da Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix compilation with Python 3.14/raised limited API/headersFriedemann Kleint2025-08-281-0/+2
| | | | | | | | Apparently, some C-headers providing string functions are no longer transitively included. Change-Id: Iec8160a3bacbc314719bbe5b32f78403900031da Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Modify headers installation for CMake buildsShyamnath Premnadh2025-07-041-1/+1
| | | | | | | | | | | | | | | | | | | Previously, the headers are installed as ${CMAKE_INSTALL_PREFIX}/include/cmake_package_name, where cmake_package_name is the CMake package name, e.g., PySide6. In the wheels, the headers were included as package_name/include. Since the level of the include directory is different, this caused issues when importing the CMake package in a downstream project. - This change modifies the installation of the headers so that the CMake install prefix and the wheels are consistent. - Additionally - this change adds the libpyside6 headers to the wheels. - The include headers for libshiboken were shipped with shiboken6-generator and not with shiboken6, which has the libshiboken binary. Change-Id: I96e3280799da169836e24551b906274f5b0fc962 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* libshiboken: Add utility class for stashing Python errorsFriedemann Kleint2025-05-071-9/+4
| | | | | | | | | It encapsulates fetching/restoring errors and uses the old or new exception API depending on version. Task-number: PYSIDE-3067 Change-Id: I6e39d92c7e79fed864b364a90c5bd5b474a41ed6 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix QtRemoteObjects tests to pass for non-unity buildsFriedemann Kleint2025-03-203-6/+7
| | | | | | | | | | | | | pysidedynamiccommon_p.h declared a static variable that is instantiated in each compilation unit in a non-unity build. Move it out of the header. Amends 19abd816e73bebdd489408d0a3b7676822bff39c. Pick-to: 6.9 Task-number: PYSIDE-862 Change-Id: I8f3ef392c50c8e2f443f1eb027bb7c54ee1c7975 Reviewed-by: Brett Stottlemyer <brett.stottlemyer@gmail.com>
* libpysideremoteobjects: Fix build with 6.10Friedemann Kleint2025-03-191-1/+1
| | | | | | | | | | | Amends 19abd816e73bebdd489408d0a3b7676822bff39c. Task-number: PYSIDE-862 Task-number: PYSIDE-3011 Task-number: QTBUG-87776 Pick-to: 6.9 Change-Id: Iba8afb9f963c34ef5bdfef4168cabcb82bf9dd3b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Make Remote Objects usable beyond ModelsBrett Stottlemyer2025-03-1314-0/+2097
While present, the Qt Remote Objects bindings to Python have not been very useful. The only usable components were those based on QAbstractItemModel, due to the lack of a way to interpret .rep files from Python. This addresses that limitation. Fixes: PYSIDE-862 Change-Id: Ice57c0c64f11c3c7e74d50ce3c48617bd9b422a3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Brett Stottlemyer <brett.stottlemyer@gmail.com>