| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Extract a mixin class handling registration of a QQmlListProperty<> and
providing virtuals for the list functionality.
It can be used by Bridges or when migrating some Bridges functionality
into PySide (for example, list properties wrapping a Python list).
Change-Id: I18db0a8196b0f8529e6d438744429a5630ee297c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
| |
This allows for removing a number of free functions and
eventually better separating QmlListProperty from Property.
Task-number: PYSIDE-3227
Change-Id: If2806f86bbbb615e59655d4f9a19b0fe87219fb5
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Take over arguments only if they are neither null nor Py_None
and simplify checks accordingly.
Make the error message more precise.
With that 2aff6a35a9aa2f233c9801456daa6986437d2647, can be
partially reverted.
Task-number: PYSIDE-3227
Change-Id: I335db395e969415022581e1ec95a7e3715725bf1
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
Replace the Qt forwarding headers by the .h files. This brings down
the dependency list by approx 6%.
Pick-to: 6.9
Change-Id: Iae7640ccbdf6a8be68137922d4191522d914d790
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Remove the global header <shiboken.h> in favor of the respective
headers.
Pick-to: 6.9
Change-Id: I08ee39fbd5abb15741fa5746bb82f9ddcd32ed7f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Import Callable, Iterable and Sequence from collections.abc,
since using them from typing is deprecated.
Pick-to: 6.8
Task-number: PYSIDE-3012
Change-Id: I131c00005df410fdaa40b338a2a728512269aaa0
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
macros
Removing old macros for compatibility with the limited api,
and refactoring some of their usages
Change-Id: I33954199d2ef9884c64b963863b97aed851c440f
Pick-to: 6.8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
All callables have now arguments.
Task-number: PYSIDE-2846
Fixes: PYSIDE-2884
Change-Id: Ibf6b1d93350304550addbc459c1440bd5cefc057
Pick-to: 6.8
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
- Initialize variables
- Use auto *
- Use nullptr
- Remove repeated return types
- Minor cleanups
Change-Id: I26cacce81a4c8ebc885f8c34d59fdac5d0026af9
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- fix broken propListCount() by changing the type of the returned value
to qsizetype. Amends f9662f9b4008f683d02c829ea59676a2cf49b2fb.
- Add tests to test all the ListProperty features.
- Fixes some flake8 errors.
Pick-to: 6.2 6.5 6.6 6.7
Task-number: PYSIDE-2698
Change-Id: I356e8af3af965374441f287391dcab9d724b28f9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Using PepType_GetSlot() as is requires adding ugly casts. To work
around, add a new file with convenience helper functions in C++
linkage. This also allows for using templates for tp_alloc.
Task-number: PYSIDE-560
Change-Id: Ia50a226f5b545861f885d600445b91b4e11713c5
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is the better concept to use the same structure for
all type creation functions. We move the type slots and
type specs into these functions.
The calling function then always has the same structure
of one static expression and returning the type.
This might also save some space for shatic structures.
Task-number: PYSIDE-2230
Change-Id: Ib972f210f44422eb1ebe47a0d92ac18a8377ac87
Pick-to: 6.6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
| |
An old thinking error was found that caused too late deletion
of an object. Note: The AutoDecref construct should never be
used in a static context.
Task-number: PYSIDE-2230
Change-Id: If6519014f564ed86ee95bd45e14ba4821274aea6
Pick-to: 6.2 6.5 6.6
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
| |
|
|
|
|
|
| |
Pick-to: 6.5
Task-number: PYSIDE-2206
Change-Id: Ia26104fba75cdba3e4d84e6fcfbffc94e4bfd3d7
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
PySidePropertyPrivate had a function pointer for the meta call
handler that was set to an internal function for most properties.
QmlListProperty would set it to a different function along with
user data. Turn this into a virtual function of PySidePropertyPrivate
and override it in QmlListPropertyPrivate. The function pointer
and the user data pointer can then be removed.
Task-number: PYSIDE-1827
Change-Id: I9c6452e2d39d5fd9b14d4c74ab7ed2fad483af29
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The names of certain interface functions are not always
following a simple scheme. Especially it is not easy
to see immediately if we are dealing with a method
of SbkObjectType or SbkObject
Do a few renamings to simplify debugging and make the code
easier to understand. When a function is used in a type spec
and there is no other important reason, it should be named
like
{Py_<tpname>: reinterpret_cast<void *>(<TypeName>_<tpname>)},
Rename also all type functions ending on "TypeF()" to end
in "_TypeF()". This is not always the case.
Examples:
SbkObjectTpNew -> SbkObject_tp_new
SbkObjecttypeTpNew -> SbkObjectType_tp_new
PyClassPropertyTypeF -> PyClassProperty_TypeF
Task-number: PYSIDE-535
Change-Id: Icbd118852f2ee732b55d944ed57c7a8ef7d26139
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
| |
Task-number: PYSIDE-1709
Change-Id: I03458bf72c2b2d37e71d16755c6a32470fb5f5e3
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
This makes the code easier to maintain.
Task-number: PYSIDE-1709
Change-Id: Idb75143a7e6d218637ab75463db88b6135cd4086
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|