diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2025-05-13 13:18:55 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2025-05-19 09:03:36 +0200 |
commit | 62e72aa6db6af546aa6a96be027e6f0c57cd8f3e (patch) | |
tree | 7d922bee315552aa504911194133672fe11a3543 /sources/pyside6/PySide6/QtQuickControls2 | |
parent | 37450c89a7582c92afc6024dc52e81fba1b419c5 (diff) |
Fix crash retrieving a PyObject type property via QVariant<PyObjectWrapper>
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 <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/pyside6/PySide6/QtQuickControls2')
0 files changed, 0 insertions, 0 deletions