aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside/pyside.cpp
Commit message (Collapse)AuthorAgeFilesLines
* libpyside: Fix compiler warning in Limited API buildsFriedemann Kleint2025-11-141-1/+1
| | | | | | | | | | Move #ifdef, fixing: sources/pyside6/libpyside/pyside.cpp:1231:13: warning: ‘void PySide::formatPy_ssizeArray(QDebug&, const char*, const Py_ssize_t*, int)’ defined but not used [-Wunused-function] Pick-to: 6.10 Change-Id: If2bd096c675a86ff0e403ef0c97928615580787a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libpyside: Add globals structureFriedemann Kleint2025-10-021-4/+3
| | | | | | | | | Put global data into a struct which in the future will exist per interpreter as interpreters can only share immortal objects. Task-number: PYSIDE-3155 Change-Id: I45ccaac57b41219bd4bd6a9151f820b00a787b0e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libpyside: Add qobjectType() to return the Python type QObjectFriedemann Kleint2025-10-011-7/+15
| | | | | | | | | | 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>
* Fix handling type with equal names in signal/slotFriedemann Kleint2025-10-011-7/+12
| | | | | | | | | | | | | | | | | | | | The decision whether to create a derived meta object class parsed from the Python type in MetaObjectBuilder was based on comparing the class name to the base meta object (the Python parsing must not be done when creating a meta object for a plain wrapped Qt type). This led to mixups when base class names were identical which is possible in Python. To fix this, split apart the code path not requiring Python type parsing (called from the wrapper code when initializing wrapped Qt classes) and expand the code for Python derived classes into initQObjectSubType(). Fixes: PYSIDE-3201 Pick-to: 6.10 Change-Id: Id62e7dc9b8af16154b161cdbf5dd0d460c55f6f1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libshiboken: Split out PEP functions from sbkpython.hFriedemann Kleint2025-09-051-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | 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>
* Fix compilation with Python 3.14/raised limited API/PyObject parametersFriedemann Kleint2025-09-031-1/+2
| | | | | | | | | | 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>
* Use the C-string functions from namespace std, consistentlyFriedemann Kleint2025-09-021-1/+1
| | | | | | | | | Complements 5608c60f47f6c39a6c1dee5fb165c6d70bd1ee3f. Task-number: PYSIDE-3171 Pick-to: 6.9 6.8 Change-Id: I57f0d8bbd8d0f82367f03d0f55297e74361c44da Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide6: Make qobjectNextAddr thread_localFriedemann Kleint2025-07-091-1/+4
| | | | | | Task-number: PYSIDE-2221 Change-Id: I72e4a5fa239653bc69da190b5b506119889d5a8f Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libshiboken: Add utility class for stashing Python errorsFriedemann Kleint2025-05-071-6/+7
| | | | | | | | | 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>
* Replace Py_GetProgramFullPath by PySys_GetObjectCristián Maureira-Fredes2025-04-101-1/+1
| | | | | | | | | 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 <Shyamnath.Premnadh@qt.io>
* PySide6: Port to Qt include styleFriedemann Kleint2025-03-271-10/+10
| | | | | | | | | 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>
* Move helper function isCompiledMethod() to libshibokenFriedemann Kleint2025-03-201-3/+2
| | | | | | | Pick-to: 6.9 Task-number: PYSIDE-2916 Change-Id: I6e72977bfcf95c3c28cc160e07febb84220fa505 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpyside: Fix some clang-tidy warningsFriedemann Kleint2025-02-031-4/+1
| | | | | | | | - Remove superfluous casts Pick-to: 6.8 Change-Id: I8dd7cdd1e9d3f30103fc6d87bf04d7f0d0182603 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpyside/ PySideSignal: Fix a memory leak connecting to signalsFriedemann Kleint2024-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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 <tismer@stackless.com> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix occasional hang of test QtWidgets/bug_844.py on Linux with DBUS-based ↵Friedemann Kleint2024-12-091-5/+8
| | | | | | | | | | | | | | 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 <cristian.maureira-fredes@qt.io>
* libpyside: Output refcount in debug operatorsFriedemann Kleint2024-11-121-1/+7
| | | | | | | | It is useful for leak checking. Pick-to: 6.8 Change-Id: Ida19cb863e8232e26c86fa82a64d0d3f741b4646 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* limited api: Remove PyBytes_AS_STRING and PyBytes_GET_SIZECristián Maureira-Fredes2024-11-081-1/+1
| | | | | | | | | 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 <Friedemann.Kleint@qt.io>
* limited api: Remove PyTuple_GET_ITEM, PyTuple_SET_ITEM, and PyTuple_GET_SIZE ↵Cristián Maureira-Fredes2024-11-081-7/+6
| | | | | | | | | | | 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>
* libpyside: Reimplement signal connections for Python callables not targeting ↵Friedemann Kleint2024-08-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix Qt Gui applications running in interactive modeFriedemann Kleint2024-07-041-1/+40
| | | | | | | | | | Set a hook calling QCoreApplication::processEvents() unless a key is pressed to PyOS_InputHook. Fixes: PYSIDE-2192 Pick-to: 6.7 Change-Id: Ibaa16fb7e605c21c67b74609de3264ef5e4fc523 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpyside: Fix static analysis warningsFriedemann Kleint2024-06-241-38/+37
| | | | | | | | | | | | | | | | - Initialize variables - Use auto * - Remove repeated return types - Fix else after return - Fix some invocations of static methods - Make functions const/static where appropriate - Fix some int types to avoid lossy conversions - Use Py_RETURN_NONE where appropriate - Minor cleanups - Remove some macros Change-Id: I7fa7a29e7b3dc47037027978001824e0709d001f Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* LazyInit: Speed up QObject conversionFriedemann Kleint2024-05-211-1/+43
| | | | | | | | | | | | | | | | | | | | Lazy loading introduced a performance regression for applications using for example an event filter on QApplication, where all internal QObject-derived types from QML occur. This triggered the lazy loading mechanism for each of those classes that have no binding. To fix this, introduce checks to typeName(const QObject *) that skip the internal classes by checking for presence of a dynamic meta object and internal type names. This should also help skipping over QObject-derived classes written in Python which also have a dynamic meta object. Fixes: PYSIDE-2749 Task-number: PYSIDE-2404 Pick-to: 6.7 Change-Id: I029d104e59820fbf3dab52a3ac65b45d97b3c2e7 Reviewed-by: Christian Tismer <tismer@stackless.com>
* libpyside: Remove duplicated LoadLazyClassesWithName() callFriedemann Kleint2024-05-211-7/+0
| | | | | | | | | | LoadLazyClassesWithName() is already called from getConverter(). Task-number: PYSIDE-2404 Task-number: PYSIDE-2749 Pick-to: 6.7 Change-Id: Ib3dc98e92eadbdebe247b1ae18d4e737c98b1501 Reviewed-by: Christian Tismer <tismer@stackless.com>
* libshiboken: Split the Shiboken::Object::newObject() functionFriedemann Kleint2024-05-061-1/+1
| | | | | | | | | | | | | | | | | | | Remove the bool exactType parameter from the existing newObject() by splitting it into 3 functions: newObjectForType() creates an instance for the type passed in. newObjectWithHeuristics() takes an additional typeName parameter obtained from typeid().name() on the C++ pointer which may contain the derived class name and also tries to find the most derived class using the type discovery graph. newObjectForPointer() is new and contains a test for multiple inheritance in the inheritance tree (disabling use of the most derived class) which was previously generated into the code. Change-Id: Ic0a25f8ec17dc20364b37062de6f20544cd2f09e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Debug operators: Fix handling of longs exceeding long long maxFriedemann Kleint2024-03-261-3/+9
| | | | | | | | | | Use PyLong_AsUnsignedLongLong if an overflow occurs. Use hex for those large values. Task-number: PYSIDE-2652 Pick-to: 6.7 6.6 6.5 6.2 Change-Id: I9c3404cf8b01b1fcda20516c1105797fc512ed53 Reviewed-by: Christian Tismer <tismer@stackless.com>
* libpyside: Add a debug operator for a Py_BufferFriedemann Kleint2024-03-141-1/+43
| | | | | | Task-number: PYSIDE-2628 Change-Id: I34646f76f509ec30e3d63fc8df296d2b5692ff0e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* LazyInit: Implement Lazy Initialization by Delayed Module EntriesChristian Tismer2024-03-131-0/+8
| | | | | | | | | | | | | | | | | | | | Lazy init is done by module entries which are delayed. Although visible in the module, the classes are only created when actually accessed by getattr. Internally, the access to the global Init_xxx functions is redirected to a Shiboken::Module::get function which resolves the classes if not already present in the global type array. PYSIDE6_OPTION_LAZY 0 - no lazy loading 1 - lazy load all known modules 2 - lazy load all modules Task-number: PYSIDE-2404 Change-Id: I98c01856e293732c166662050d0fbc6f6ec9082b Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PEP 697: Use the new type extension provisionChristian Tismer2023-12-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | By Python 3.12, there is now an official way to extend heap types by custom extra data. When we supported PyPy, the old type extension of PySide did no longer work, and we introduced shadow dicts. With the interface found in Python 3.12, we can use direct extended data, again. The supporting structures are not Limited API compatible. We implemented a patch that enables this anyway, but it is valid for this version only without a new review. NOTE: The documentation lists `PyObject_GetTypeData` as Limited API since Version 3.12, but in fact we had to write a cheating patch. [ChangeLog][PySide6] Hidden Type Extensions according to PEP 697 are now used instead of shadow dictionaries. Change-Id: I4b724ba7bcc72470b13f55ea5ebf94666061420d Task-number: PYSIDE-2230 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix usages of QLatin1String (deprecation candidate)Friedemann Kleint2023-11-291-1/+1
| | | | | | | | | Use QLatin1StringView or literals. Task-number: PYSIDE-2537 Change-Id: I03cb9ae80dacd84da9e53648dd179ad79e9189b1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PEP 697: Introduce the SbkObjectType_Check functionChristian Tismer2023-10-251-0/+2
| | | | | | | | | | | | | | | By Python 3.12, there is now an official way to extend heap types by custom extra data. In order to make that most effective, we can no longer accept every type in PepType_SOTP, but keep the types carefully apart. This is done with SbkObjectType_Check, which is very rarely necessary. Change-Id: I9cc4b594f2f676712ba92bf7733c4321b717f252 Pick-to: 6.6 Task-number: PYSIDE-2230 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Avoid some string conversionsFriedemann Kleint2023-09-271-2/+3
| | | | | | | | | Remove some usages of String::toCString(func_name) and construction of a QByteArray. Pick-to: 6.6 6.5 Change-Id: I9fb29341fba1be205e70d8d5ffc1a6d258ef87dd Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Improve libpyside debug operatorsFriedemann Kleint2023-09-261-0/+31
| | | | | | | | | | | | Output True/False directly. Also output methods and functions. Amends 74a2ec0202af250828c10dfb10b71036a3af9dd8. Task-number: PYSIDE-229 Pick-to: 6.6 Change-Id: I3625853ec5deef03cb6f94f24e0a2e80d4ac30a7 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Replace typedef by usingFriedemann Kleint2023-09-201-1/+1
| | | | | | | Pick-to: 6.6 6.5 Change-Id: I23d8ea03ec578a897352c2627417a706ca71ef82 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* libshiboken/libpyside: Fix some static analysis warningsFriedemann Kleint2023-09-201-1/+1
| | | | | | | | | | | | - nullptr - narrowing integer conversions - else after return - Use auto - Missing move special functions Pick-to: 6.6 6.5 Change-Id: Ib872481a46c8bb17592cdc1778ab3c4d9598c753 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpyside: Add QDebug operators for PyTypeObject/PyObjectFriedemann Kleint2023-08-281-0/+107
| | | | | | | | | | Complement the operators std::ostream in libshiboken which are very verbose, outputting all flags and refcounts, by simple operators for QDebug which basically output a simple type: value. Change-Id: Icf99c55cd64d63eb9d2e47b40fdc6df88e9119e3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* PySide6: Fix connecting signals with arguments by constructor kwargsFriedemann Kleint2023-05-221-5/+22
| | | | | | | | | | | | The search was only implemented for signals without arguments by appending "()" to the signal name to form the search signature. Implement a search by signal name only. Fixes: PYSIDE-2329 Pick-to: 6.5 Change-Id: I295150cdebe60c886891553c9f31d14011a004d6 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Implement multiple inheritance correctly, compatible versionChristian Tismer2023-03-211-1/+6
| | | | | | | | | | | | | | | | PySide does not implement multiple inheritance. Please see "About Multiple Inheritance in Python" at the issue. This patch just supports the `__init__` call. A more consequent implementation will follow that supports multiple inheritance with every method. [ChangeLog][pyside6] Cooperative multiple inheritance is now implemented for all __init__ methods. Fixes: PYSIDE-1564 Change-Id: I8df805d22c2052c3a9747420a86341f64e29a5ad Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix exit crash related to QObject::thread()Friedemann Kleint2023-03-101-0/+5
| | | | | | | | | | In the deletion handler registered by getWrapperForQObject(), add a check whether Python is still initialized. Fixes: PYSIDE-2254 Pick-to: 6.4 Change-Id: I20d221b57fc9d0aaa7ef4067a79fb0c3bb4ef844 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix '&&' within '||' warningsAdrian Herrmann2023-02-151-2/+2
| | | | | | | | Placing parentheses around the '&&' expression silences this warning. Pick-to: 6.4 Change-Id: Ic7884834de1fd3e38b7477d3946b8757d40e27ba Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix broken Qt prefix for conda installsAdrian Herrmann2023-02-141-1/+9
| | | | | | | | | | | | If PySide6 is installed through Anaconda, it will conflict with Anaconda's own Qt package, which is based on Qt 5, creating a version mismatch. To work around this, if PySide runs in a conda env, register an internal qt.conf setting the prefix value to the corresponding path in site-packages. Pick-to: 6.4 Change-Id: I5639d7eeaf524a8a4aa533dc5a83bdb0c74cbd9f Reviewed-by: Christian Tismer <tismer@stackless.com>
* libpyside: Remove function `getMetaDataFromQObject`Friedemann Kleint2023-02-131-6/+0
| | | | | | | | | Complements e20e29d1bd03f6ff9e57037d0a7f35bb59604f4. Task-number: PYSIDE-1889 Task-number: PYSIDE-1019 Change-Id: Iddf0cdfebf23f3f305e73e3de7e80c5582efc44d Reviewed-by: Christian Tismer <tismer@stackless.com>
* pyside.cpp: Light refactoringAdrian Herrmann2023-02-101-14/+15
| | | | | | | | Just some light refactoring, cleanup, whitespace fixes etc. Pick-to: 6.4 Change-Id: Ia37195d20b1925fbe25449a022a4965c64a17b01 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* signal: Finally clean up all leaks after complete understandingChristian Tismer2023-02-071-9/+1
| | | | | | | | | | | | | | | | | | | | | The PYSIDE-79 bug was never understood, completely. After getting much more clarity through the work on PYSIDE-2201, the real problem could be found: It turned out that the implementation of descriptors was incomplete. Instead of respecting an already cached instance, it created a new one, all the time, resulting in a serious leak! This became visible by deep inspection of the control flow with VS-Code. After the interaction of PyObject_GetAttr, getHiddenDataFromQObject and signalDescrGet became transparent, the function was completed and the issue finally solved. Fixes: PYSIDE-79 Task-number: PYSIDE-68 Task-number: PYSIDE-2201 Change-Id: Ifd6098b1ce43d9bf51350218deb031bbf9ccb97a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix encoding of prefix path in embedded :/qt/etc/qt.conf resourceFriedemann Kleint2023-01-251-7/+1
| | | | | | | | | | | | | | QString-type entries of QSettings are UTF-8 in Qt 6; do not use toLocal8Bit(), which uses the code page on Windows. Amends 4134ffd908144a5cf7c84333d2b2726c86ac8762. Pick-to: 6.4 6.2 Fixes: PYSIDE-2204 Task-number: PYSIDE-972 Change-Id: Id59019caa1e01a90bd8836db63c50e3b582c3ecf Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PySide6: Port from QSharedPointer to std::shared_ptrFriedemann Kleint2023-01-041-4/+5
| | | | | | Task-number: QTBUG-109570 Change-Id: Ieb13bf352d9b75e364a73bddc464548ec19701ed Reviewed-by: Christian Tismer <tismer@stackless.com>
* libpyside: Rename the static stringsFriedemann Kleint2022-12-161-6/+6
| | | | | | | | | | | | Shiboken::Py(Magic)Name needs to be disambiguated from PySide::Py(Magic)Name as otherwise using namespace Shiboken; using namespace PySide; leads to ambiguities in jumbo builds. Task-number: PYSIDE-2155 Change-Id: I7ffd1c9325f9c9a83be8ef797aebb096cc15f593 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* __feature__: Fix a weird case of false metafunction lookupChristian Tismer2022-12-131-2/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | PySide implements duck-punching since 2010. This could create a problem with true_property since 06/2019, because a meta-function could be found in the instance dict of a QObject class, although the methods were replaced by a property object. This was an unexpected reaction of the `getMetaDataFromQObject` function. Meta methods were created and inserted into the instance dict, which caused very unrelated side effects like infinite recursion. The new implementation handles Python properties correctly and looks up the hidden methods if necessary without side effects. There are no longer meta functions involved. The function `getMetaDataFromQObject` is misleading and was replaced by `getHiddenDataFromQObject`, keeping the old name as an alias. It will be finally removed in version 6.5 . [ChangeLog][PySide6] A callback error when using true_property was fixed. Change-Id: Ie5234eab2106885f6edad24ae7d4c55fff43d62f Fixes: PYSIDE-1889 Pick-to: 6.4 Task-number: PYSIDE-1019 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* __feature__: Remove the no longer efficient reserved_bits structureChristian Tismer2022-11-291-3/+4
| | | | | | | | | | | | | | | The reserved_bits structure is no longer an optimization after moving to PyPy. Accessing any extra field involves always a dict lookup. - remove the reserved_bits field - re-order SbkObjectTypePrivate - replace access functions by currentSelectId() Task-number: PSYIDE-2029 Change-Id: I08642eace9a6399649c039bcc358ce678bbd4fd3 Pick-to: 6.4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* __feature__: Cleanup and optimize before changing true_propertyChristian Tismer2022-11-231-15/+15
| | | | | | | | | | Casing and naming was adjusted, minor correction, replaced QString(List)? with QByteArray(List)?. Change-Id: I0dae86fbd8dd27d5460ecb7f44f81134c69acb5d Pick-to: 6.4 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>