| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The deletion of the weak ref in ~TrackingMethodDynamicSlot() did not
reliably stop the notification from being triggered, causing
corruption later on since the address of the dynamic slot was used as
user data.
Use the Python receiver object as user data instead (which is only
used for map look up) to delete the connection to protect against
multiple invocation.
Remove the deletion of the weakref since it is removed in the
notification.
Remove class TrackingMethodDynamicSlot as it does not really have any
functionality any more.
The comment about releasing the weakref in case DynamicSlot outlives
Python is apparently not an issue since otherwise the deletion of the
function in ~MethodDynamicSlot() would have caused issues.
Amends 33bd61d13d8d9e3794b6049891be62f3351313d9.
Pick-to: 6.9 6.8
Fixes: PYSIDE-3148
Task-number: PYSIDE-2810
Change-Id: Idc07d0774afaf99df93185c90e975291a42ffeaf
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Explicitly move the tracker helper object to the thread.
Fixes: PYSIDE-3137
Task-number: PYSIDE-2221
Task-number: PYSIDE-2810
Change-Id: I308467ca9ef8acab35d30578ca694136855c2d1a
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
| |
Task-number: PYSIDE-2221
Change-Id: I72e4a5fa239653bc69da190b5b506119889d5a8f
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
| |
Task-number: PYSIDE-2221
Change-Id: Ib494a0404de4aa463078b5fd9788e40cecc25ae8
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Variables PYSIDE_PYTHONPATH, PYSIDE_TYPESYSTEMS, PYSIDE_GLUE were
corrected to correctly reflect the paths for the build-tree in the
CMake configuration files during super-project build of PySide6.
These were also corrected for the install-tree based on the wheel
structure.
- Introduce two new CMake variables PYSIDE_PYTHON_CONFIG_SUFFIX
and PYSIDE_SO_VERSION shipped with the CMake config files.
- Fix pyside6qml to use the export set of pyside6.
Change-Id: I3b177bfed31af1d0e3a13fcc9469019a7f349d22
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the delayed creation of QMetaEnum's in MetaObjectBuilder, when
parsing QEnum-decorated values, check for large quint64 values and add
them correctly.
For class QMetaEnum, instead of exposing the newly added functions
"std::optional<quint64> value64()" and similar, inject code handling
large values into the existing bindings since Python's int type is
able to represent the type.
Adapt to qtbase/d41b87e06742b491c4e36aeae32e03f85b078d69.
[ChangeLog][PySide6] @QEnum, @QFlag and QMetaEnum now support unsigned
64 bit values for QML usage (with the exception of Qt Widgets Designer).
Task-number: QTBUG-27451
Task-number: QTBUG-111926
Task-number: PYSIDE-1735
Change-Id: Ib0b26dbc350c404d354c8f53afee946e29f2adb3
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Complements 4aa48368667bee64e48f7c9d6b3a935411d5f23c.
Task-number: QTBUG-27451
Task-number: QTBUG-111926
Task-number: PYSIDE-2840
Change-Id: I8ddd138bae667bf2411c3d71b0d718a8eb217f7f
Reviewed-by: Shyamnath Premnadh <[email protected]>
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create a dynamic QMetaType for @QEnum-decorated enumerations so that Qt
Widgets Designer is able to recognize the properties.
[ChangeLog][PySide6] It is now possible to use @QEnum/@QFlag-decorated
enumerations as properties of custom widgets in Qt Widgets Designer.
Task-number: PYSIDE-2840
Change-Id: I58a16002f89678856b7f33d687cf99f00c6f0cc7
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old code registered a Shiboken converter for PyObjectWrapper by
pointer conversion. This resulted in the Python to C++ converter
falling back to plain pointer passthrough since it only works for
SbkObjects.
The C++ to Python conversion worked by coincidence for either raw
PyObject * pointers used in meta call handling or pointers obtained
from calling QVariant<PyObjectWrapper>.data(), but without handling
reference counts.
To fix this, remove the Python to C++ conversion entirely and do this
manually via QVariant. Change the C++ to Python to be by value and use
PyObjectWrapper.
Fixes: PYSIDE-2193
Pick-to: 6.9
Change-Id: I00898894651f220d7b8fe60608e93233ef3e6493
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
|
|
|
| |
This useful for debugging QML issues.
Task-number: PYSIDE-2193
Pick-to: 6.9
Change-Id: Iecbfb1d9508ac89c8b213a2f2ee8d4f7f1de4fc8
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
|
|
|
| |
This is required by today's QVariant conversion code.
Task-number: PYSIDE-2193
Pick-to: 6.9
Change-Id: I66efcfb797653fe1d617f1f0027fd60ec95e8a79
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
| |
Task-number: PYSIDE-2916
Change-Id: I4e4619b5144451512be3eadc6810df3f3f47ada0
Reviewed-by: Christian Tismer <[email protected]>
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Make sure to store QtEnums in QVariant when the enum has a metatype.
Fixes: PYSIDE-3084
Change-Id: I94b89f89e6fb3c58560325f2a6843a5260d86557
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Guard the deletion tracker listening on QObject::destroyed() using GIL.
Amends 33bd61d13d8d9e3794b6049891be62f3351313d9.
Fixes: PYSIDE-3072
Task-number: PYSIDE-2810
Task-number: PYSIDE-2221
Pick-to: 6.9 6.8
Change-Id: Ia085fa551903dd39c7a9624f6995d8720e9f7fb0
Reviewed-by: Ece Cinucen <[email protected]>
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Py_GetProgramFullPath is deprecated from 3.13 and the recommendation
is to use PySys_GetObject("executable") instead.
Pick-to: 6.9
Change-Id: Ia0b0424d6fe593343272d862b05727579fad2a86
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
|
|
| |
Task-number: PYSIDE-3012
Pick-to: 6.8 6.9
Change-Id: I720dd730f6dd28ae33a6019494b7b67b8f704a10
Reviewed-by: Christian Tismer <[email protected]>
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Remove the global header <shiboken.h> in favor of the respective
headers.
Pick-to: 6.9
Change-Id: I08ee39fbd5abb15741fa5746bb82f9ddcd32ed7f
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
| |
Pick-to: 6.9
Task-number: PYSIDE-2916
Change-Id: I6e72977bfcf95c3c28cc160e07febb84220fa505
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
|
|
|
| |
- This enables the class to be used in libpysideqml to support
the `AutoQmlBridge` function.
Task-number: QTBUG-134668
Change-Id: I9c639c76ce23117dc259a811a7c4257fc79179a7
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
The old implementation was calling the string-based overload, but did
not add the '1'/'2' markers added by SIGNAL/SLOT. Call the QObject
overload directly.
Fixes: PYSIDE-1277
Pick-to: 6.8
Change-Id: I912f46c33959b622301b0a75e771057c8874f7e3
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
| |
The restricting type annotation for call function in Slot class is updated to more flexible one.
Pick-to: 6.8
Task-number: PYSIDE-2846
Change-Id: Ic26ebb42bb6bfe4f4d0455125ac92b3552c62d06
Reviewed-by: Christian Tismer <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Amends cab304e70cce68bbdaa70d7f7b2bf6e95e85e6d2.
Restructure the test.
Pick-to: 6.8
Fixes: PYSIDE-3020
Task-number: PYSIDE-1057
Change-Id: I8954a534648ded5d476fec608d0699132a026461
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Add a further indirection in callPythonMetaMethodHelper()
when only a pointer conversion is available for a const-ref parameter.
Task-number: PYSIDE-3004
Change-Id: I6ec7c5a9d4d30c8e4973ec79534d5f3eb3bf8204
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
|
|
| |
- Remove superfluous casts
Pick-to: 6.8
Change-Id: I8dd7cdd1e9d3f30103fc6d87bf04d7f0d0182603
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
In preparation for a change that might remove the automatic finding of
private modules.
Task-number: PYSIDE-2862
Task-number: QTBUG-87776
Change-Id: I22f872d341b20a3f39aa722ee83c2a7993661710
Reviewed-by: Alexandru Croitor <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change dc7acd1f2dc750c3c8602203ae1558b0e60a3c17 added a reference
to signal senders not created in Python to fix a crash when doing
something like:
QAbstractItemView.selectionModel().currentChanged.connect(...)
In addition, the code kept a weakref on the sender and tracked its
deletion.
To simplify this, keep a tracking QPointer on the sender QObject and
its PyTypeObject * instead of a PyObject * . This also allows for
calling QObject::connect() and other helpers directly instead of using
PyObject_CallObject() on the PyObject * to forward the calls.
Fixes: PYSIDE-2793
Fixes: PYSIDE-1057
Task-number: PYSIDE-79
Change-Id: I1ce6f4c35c819f3e815161788cdef964ffc6fd96
Reviewed-by: Christian Tismer <[email protected]>
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a struct shared by shared_ptr in all instances of
PySideSignalInstancePrivate that is tracked by the weak reference.
Amends db40e3e07932576bc54cd922eecd423c0f675613
Task-number: PYSIDE-2201
Task-number: PYSIDE-79
Pick-to: 6.8
Change-Id: Ic7bb836422f3843a02474f2bb92641b8a9ebc824
Reviewed-by: Shyamnath Premnadh <[email protected]>
Reviewed-by: Christian Tismer <[email protected]>
|
|
|
|
|
|
| |
Pick-to: 6.8
Change-Id: I1a5964463f703ade0657816cb974206355a5ae5b
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
accessibility
The test installs a global event filter on QApplication which then
receives events from DBUS classes doing accessibility. Then apparently
something moves the DBUS receivers to different threads which causes
hangs later on when PySide tries to release the wrapper. Fix by
checking the presence of a wrapper first before releasing (empirical).
Pick-to: 6.8
Change-Id: I91480461afb19c8fc1fa7a329f63243c0dacb22c
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
PyCFunction_GET_FLAGS
Removing old compatibility macros from the initial limited api
implementation.
Change-Id: I3044609ade36b5b378de05934eab8a098450f42f
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
| |
It is useful for leak checking.
Pick-to: 6.8
Change-Id: Ida19cb863e8232e26c86fa82a64d0d3f741b4646
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Remove old macros usages for the Limited API compatibility,
and doing some refactorings to their usages.
Change-Id: I10d675a1831d26b3fc878151e3a6ec40c5caddb1
Pick-to: 6.8
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PySequence_Fast_GET_SIZE is defined as:
(PyList_Check(o) ? PyList_GET_SIZE(o) : PyTuple_GET_SIZE(o))
and when using the Limited API we re-define the _GET_SIZE macro
to be the _Size function, and considering this is our standard
use case, the macro could be replaced directly by the function.
Replacing also some cases were int was used instead of Py_ssize_t
when using PySequence_Size.
Pick-to: 6.8
Change-Id: I31aecd571a1d8ea82a3441f0b9e16ee19f026b05
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PySequence_Fast_GET_ITEM is defined as:
(PyList_Check(o) ? PyList_GET_ITEM(o, i) : PyTuple_GET_ITEM(o, i))
and when using the Limited API we re-define the _GET_ITEM macro
to be the _GetItem function, and considering this is our standard
use case, the macro could be replaced directly by the function.
However, the function returns a new reference, so we need to manually
drecrease a reference after the usage, to avoid reference counting
issues.
Change-Id: If361e80b9e40b033e009ad46b2b9430e5b4c8eaa
Pick-to: 6.8
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extract the error handling code which existed duplicated in
GlobalReceiverV2::qt_metacall() and
SignalManagerPrivate::handleMetaCallError() as a static helper of
SignalManager and call that from the DynamicSlot functions.
Amends 33bd61d13d8d9e3794b6049891be62f3351313d9.
Pick-to: 6.8 6.8.0
Task-number: PYSIDE-2810
Fixes: PYSIDE-2900
Change-Id: Ife9f156e6752dde7002218d36d369ba68ad595b0
Reviewed-by: Christian Tismer <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
All callables have now arguments.
Task-number: PYSIDE-2846
Fixes: PYSIDE-2884
Change-Id: Ibf6b1d93350304550addbc459c1440bd5cefc057
Pick-to: 6.8
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
PyArg_ParseTupleAndKeywords() can return Py_None for invalid
types in the property decorator, for which getTypeName()
returns "void". Set an error in this case.
Pick-to: 6.8
Task-number: PYSIDE-2840
Change-Id: I98a497df445d9b543dddaa495d85042e00673e78
Reviewed-by: Christian Tismer <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Callables wrapping C-function and their objects (as returned by
"qobject.deleteLater()") may be temporary objects like methods.
For the connection cache key, use self and the actual C-function
as so that a disconnect succeeds.
This did not show in the old design since the disconnect code
did expensive checks to retrieve the slot index of the function
and used the index code path.
Amends 33bd61d13d8d9e3794b6049891be62f3351313d9.
Pick-to: 6.8
Task-number: PYSIDE-2810
Task-number: PYSIDE-2221
Change-Id: Ic33af0d5da60589df16ca35c17824da592910a4d
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
|
|
| |
Add a helper function checking on a weak reference.
Task-number: PYSIDE-2751
Change-Id: I4f2d505636a24df083b0d2f4d3d312fcc44d125e
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a QMetaMethod
The code previously used a instances of class GlobalReceiverV2 inheriting QObject in a hash in
SignalManager per slot tracking the list of senders to be able to use standard signal/slot
connections in Qt. This was a complicated data structure and had issues with cleanups.
This has been replaced by using an invoker object based on QtPrivate::QSlotObjectBase which
can be passed to
QObjectPrivate::connect(const QObject *, int signal, QtPrivate::QSlotObjectBase *, ...).
The connections (identified by ConnectionKey) are now stored in a hash with QMetaObject::Connection
as value, which can be used to disconnect using QObject::disconnect(QMetaObject::Connection).
Deletion tracking is done by using signal QObject::destroyed(QObject*) which requires
adapting some tests checking on the connection count and weak ref notification on receivers
as was the case before.
[ChangeLog][PySide6] Signal connections for Python callables not targeting a QMetaMethod
has be reimplemented to simplify code and prepare for removal of the GIL.
Task-number: PYSIDE-2810
Task-number: PYSIDE-2221
Change-Id: Ib55e73d4d7bfe6d7a8b7adc3ce3734eac5789bea
Reviewed-by: Shyamnath Premnadh <[email protected]>
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Split the Enum check function to have an overload for a
PyTypeObject * and add a helper function checking whether
an enumeration is registered in the Qt meta type system.
If so, use its name for the property type.
Fixes: PYSIDE-2840
Change-Id: I8253e28d9020dcda9b23d6ad5ddd4e60cd2086d7
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Extract a helper for matching the signal instance and use it from
signalInstanceConnect() and signalInstanceDisconnect(). This currently
only matters for signal QObject::destroyed(QObject*) and
QObject::destroyed().
Task-number: PYSIDE-2810
Change-Id: I8ebb8487c7b6953cbfff2179c3b5081a3674bf16
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|