aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside
Commit message (Collapse)AuthorAgeFilesLines
...
* 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: Clean up lambdas connected to signals earlier in shutdownFriedemann Kleint2024-03-252-1/+21
| | | | | | | | | | | Run a signal handler cleanup in CoreApplication::aboutToQuit() already before the general cleanup. This prevents them from leaking out of a main() function, for example. Task-number: PYSIDE-2646 Pick-to: 6.7 6.6 6.5 Change-Id: I87cce8d131c40c02b44b0102b3774477676b8f89 Reviewed-by: Christian Tismer <tismer@stackless.com>
* libpyside: Fix spelling error in function nameFriedemann Kleint2024-03-253-10/+10
| | | | | | | | | | Amends 1270a9e82e5bc3bd53a1131698ece60403da1192. Task-number: PYSIDE-2646 Task-number: PYSIDE-2141 Pick-to: 6.7 6.6 6.5 Change-Id: Ib8a5146766166ec4fa7ae7b42ce6d52ccae0b3c6 Reviewed-by: Christian Tismer <tismer@stackless.com>
* libpyside: Add a debug operator for a Py_BufferFriedemann Kleint2024-03-142-1/+52
| | | | | | 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>
* libpyside: Improve type conversion error messages of metafunction invocationFriedemann Kleint2024-03-131-21/+36
| | | | | | | | | Refactor and streamline the code a bit. Pick-to: 6.6 Task-number: PYSIDE-2633 Change-Id: I433b136ac036a9a297d2c22ad8dfa6af45ad46b0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add QIOPipeAdrian Herrmann2024-03-131-2/+2
| | | | | | | | | | | | Add an implementation for a QIODevice that can be used to work with anonymous pipes. It needs to be able to emit the bytesWritten and readyRead signals. This implementation is lifted from the qt5 source tree (qtdeclarative/tests/auto/qmlls/lifecycle) and might be added to Qt in the future, at which point it will be removed from the PySide source tree. Change-Id: Iff1208a366dad747352e7507da0818934c26aa4f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Feature: Prepare feature and signature modules to stand lazy initChristian Tismer2024-03-053-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | When lazy initialization is used, unexpected situations are coming up. The feature switching may call into signature init without knowledge that feature dicts are already switched. Fix this by - disabling feature switching during lazy init of a class - allow this disabling from PySide and Shiboken - Create a way to find the unchanged type dict of features UPDATE: Switching speed is now as high as before. This check-in was extracted after the fact, although it claims to exist beforehand which would have been better. This was quite a painful experience. Change-Id: I6639b7a3c22d21d3b9dd0627e2880a7b7a03d134 Task-number: PYSIDE-1019 Task-number: PYSIDE-2404 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Use new comparison helpers for equality in shiboken/libpysideFriedemann Kleint2024-03-011-10/+7
| | | | | | | | | Task-number: QTBUG-103757 Task-number: PYSIDE-2497 Change-Id: I1b0fd5b1cad908ee612ab33ca0aacffc55947d87 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Adapt to renaming of namespace QAudio->QtAudioFriedemann Kleint2024-02-281-1/+9
| | | | | | | | | | | - Adapt the examples. - Create an alias into the module. - Add a hack to the signal manager for signals which maintain the old string-based signature. Task-number: PYSIDE-2497 Change-Id: I9db5e59851a2cb9161fdcecf87e78d980eda2045 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QObject: Add connect() overload with context argAdrian Herrmann2024-02-075-0/+127
| | | | | | | | | | | On C++, there is an overload of QObject::connect() that allows passing a context object. This creates a connection in the context object's event loop instead of that of the caller. This implements said overload in Python. Pick-to: 6.6 Change-Id: Ia6a098a04470741efd450818c31aa5bffb1bd9f8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Replace <QtCore/QtGlobal> by respective smaller headersFriedemann Kleint2024-01-254-4/+6
| | | | | | | Task-number: QTBUG-99313 Task-number: QTBUG-97601 Change-Id: I2422a995d73f19e385c73d54410004f7b8f9d77b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix debug assert in test signals/bug_189.pyFriedemann Kleint2024-01-181-2/+7
| | | | | | | | | | | Do not use the %S-formatting directive when an error is already set, since that will invoke str() and thus cause an error. Amends d7aa15abe25bd71ea19180743ce9b41e0b788520. Task-number: PYSIDE-1275 Change-Id: I1125ca254efdeeb3652d6171d71f3e22fb686a7a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Change QObject.disconnect() to return False with warning on failureFriedemann Kleint2024-01-161-7/+13
| | | | | | | | | | [ChangeLog][PySide6] QObject.disconnect() now returns False instead of raising an exception for non-fatal cases. Fixes: PYSIDE-1275 Change-Id: I860b69e1a7055c38f903ffafd7f816575c0d1f7a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Use PyType_GetSlot() instead of accessing PyTypeObject's slots in library codeFriedemann Kleint2024-01-166-20/+23
| | | | | | | | | | 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>
* Avoid converting to string for calculating the hash valueFriedemann Kleint2023-12-191-1/+1
| | | | | | | | | | | | | | | Partially revert bf8a60db4cdbfc3e7c9c98778b219e9c83746d44, which introduced a helper function converting to QString for Q(Date)(Time) and QUrl. For these classes, the qHash() function should be found by the code model after 9c37876d6f649b3c9bd1411d3c7ffe620786f1a8. Extend the test accordingly. Deprecate the QString-helper. Task-number: PYSIDE-1906 Change-Id: Ia210a2210bc6a43991d5b26374039f4e86d0e71e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Modernize qHash functions preparing introduction of Qt's comparison helpersFriedemann Kleint2023-12-192-11/+6
| | | | | | | | | Use qHashMulti, noexcept and make them inline friends. As a drive-by, also make comparison for Clang structures noexcept. Pick-to: 6.6 Change-Id: Ibdcbf3bde90af0fc419bd1640d3f45602f772f9a Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@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>
* Enable connecting signals to slots with default parametersFriedemann Kleint2023-11-291-8/+27
| | | | | | | | | | | | | | | Find the number of default parameters using PyFunction_GetDefaults() and change the argCount() helper to return the min/max argument count. With that, try to match the slot using the most argument. [ChangeLog][PySide6] It is now possible to connect signals to slots/lambdas with more arguments provided they have default parameters. Fixes: PYSIDE-2524 Change-Id: I134d33e3ee78b62689fa36887a9acd41951c02e1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpyside: Remove QHash used when adding signals from QMetaObjectFriedemann Kleint2023-11-281-10/+19
| | | | | | | | | Replace it by a list. Task-number: PYSIDE-2524 Change-Id: I16089a2f53f10726377f4ed66bc466549f4f6474 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpyside: Avoid parsing signatures in Signal.connect()Friedemann Kleint2023-11-282-24/+23
| | | | | | | | | | | Store the argument count as obtained from QMetaMethod or Signal argument parsing via PySideSignalData::Signature in PySideSignalInstancePrivate and use that to find a matching slot instead of parsing the signature. Task-number: PYSIDE-2524 Change-Id: I7c30bd1ee7873b4d13c40e0a91a4ace9026890a2 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpyside: Remove struct SignalSignatureFriedemann Kleint2023-11-282-76/+29
| | | | | | | | | | | | | | | | SignalSignature is temporarily used while constructing Signal instances and finally converted into a PySideSignalData::Signature. Change the code to use PySideSignalData::Signature right away, which allows simplifying the code. As a drive-by, fix the less-than method. Shorten the data type for the attributes to be able to add further values. Pick-to: 6.6 Task-number: PYSIDE-2524 Change-Id: I4b67d55b65356fbf56633bbbe1d3ef466167227c Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Shiboken: Fix an oversight when removing ob_typeChristian Tismer2023-11-201-4/+42
| | | | | | | | | | | | | | | | SbkObjectType's meta type was changed due to a wrong fix. This has strange side effects when applying PEP 697 because a wrong action is taken. The meta class for class property was also rewritten to have its own meta class for PEP 697 compatibility. Amends: 73adefe22ffbfabe0ef213e9c2fe2c56efdd7488 Change-Id: I2d5c0a58e274c0a60496e29cbd714b9e69bfffbd Pick-to: 6.6 6.5 6.2 Task-number: PYSIDE-2230 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* libpyside: Port the signal signature code from QString to QByteArrayFriedemann Kleint2023-11-164-24/+25
| | | | | | | | | | Since the name ends up in QMetaObject::addSlot() taking a QByteArray anyways, there is no point in constructing the name using QString. Task-number: PYSIDE-2524 Change-Id: Ib27a55efa8b22eb983d5e27e3a981efd72e9996f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpyside: Fix slot names in GlobalReceiverV2Friedemann Kleint2023-11-161-0/+4
| | | | | | | | | | | Replace "<lambda>" by "_lambda_" when one is passed. Task-number: PYSIDE-2524 Pick-to: 6.6 Change-Id: I9839c5e2862fc8c0153653eff1d29cf759dc5875 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Set error when instantiating a Signal on a non-QObjectFriedemann Kleint2023-10-271-1/+2
| | | | | | | Fixes: PYSIDE-2510 Pick-to: 6.6 6.5 Change-Id: Icc1461299907cc116bc75f5de994a687b85c1786 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Fix signature of SignalInstance.connect()Friedemann Kleint2023-10-271-1/+3
| | | | | | | | | | Amends 7878a88aa638da63b8a2ec2200bbe18882277d21. Pick-to: 6.6 6.5 Fixes: PYSIDE-2509 Task-number: PYSIDE-1334 Change-Id: I92fc4021054b1473bd6769ffb9ff0e6803b5439e Reviewed-by: Adrian Herrmann <adrian.herrmann@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>
* shiboken: Unify the structure of type creation functionsChristian Tismer2023-10-256-146/+182
| | | | | | | | | | | | | | | | 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>
* Fix threading deadlocks of QObject::(dis)connect() with (dis)connectNotify()Friedemann Kleint2023-10-241-2/+9
| | | | | | | | | Do the connect/disconnect within allow-threads. Fixes: PYSIDE-2367 Pick-to: 6.6 6.5 Change-Id: I95c908d438a4a6c9cd0a23d3fce31a53e02ea19d Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* QML registration code: Port from std::string to QByteArrayFriedemann Kleint2023-10-232-5/+5
| | | | | | | | | | | | Modern QML registration code is based on QMetaClassInfo, which uses QByteArray; so, this will avoid conversions in the future. As a drive-by, shorten some code and move getGlobal*() helpers to the top for future changes. Task-number: PYSIDE-2484 Change-Id: Iceadca5a42b5fb7cee330e61d543ca712b521ab3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QML registration code: Extract a setter from the ClassInfo decoratorFriedemann Kleint2023-10-233-25/+55
| | | | | | | | | | | | | Change it to operate on a list of key/value pairs instead of a QMap (no use in enforcing sorting) and extract a setter for setting QMetaClassInfo data on a PyTypeObject of a QObject. To be used for QML decorators. As a drive-by, fix some static analysis warnings about implicit bool casts. Task-number: PYSIDE-2484 Change-Id: Ia759bb42740ed279f36c0850306ebd9bee526ecf Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add a separate __str__ function for SignalFriedemann Kleint2023-10-231-2/+16
| | | | | | | | | List all signatures, separated by ';'. Pick-to: 6.6 6.5 Fixes: PYSIDE-2493 Change-Id: I3c7e3367c340ab142a388a3991dc08774b6c7075 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Improve error messages around signal/slot connectionsFriedemann Kleint2023-10-172-5/+7
| | | | | | | Task-number: PYSIDE-2487 Pick-to: 6.6 6.5 Change-Id: I93d2c350aecf1339c6b18496f376d04cdd37dc29 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libpyside: Implement QMetaMethod::tags() for @SlotFriedemann Kleint2023-10-173-7/+18
| | | | | | | | | | | | | Tags can be used like annotations and are for example used in the DBus module. [ChangeLog][PySide6] An optional parameter "tag" has been added to @Slot, allowing to set QMetaMethod.tag(). Pick-to: 6.6 Fixes: PYSIDE-748 Change-Id: I62bef6179917307471cb72491ac3d05970572f3f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Support running PySide on Python 3.12, cleanupChristian Tismer2023-10-161-1/+1
| | | | | | | | | | | | | | | | | In the course of fixing 3.12 issues, a 3.11 fix for PyEnum was missing that created a 3.11 error. A bug with deployment was fixed but not reflected in the tests. This was only visible for pyenv users. Also fixes a minor cosmetic bug introduced by "Python 3.12: Fix the structure of class property" Task-number: PYSIDE-2230 Change-Id: I3a6bd6426e23168dfccdda17b408f193aacd28a0 Pick-to: 6.2 6.5 6.6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix crash when running a limited API build of 3.9 in 3.12Friedemann Kleint2023-10-132-2/+11
| | | | | | | | | | | | The size of propertyobject as needed as basic size of PyClassProperty_spec needs to be adapted according to runtime version. Otherwise, PyType_FromSpecWithBases fails with: TypeError: tp_basicsize for type 'PySide6.QtCore.PyClassProperty' (56) is too small for base 'property' (64) Pick-to: 6.6 6.5 Task-number: PYSIDE-2230 Change-Id: I03788edbb7031577f37db0fb2eb029b41f37c5f1 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix disconnecting non-decorated slot of base class from signalFriedemann Kleint2023-10-131-1/+2
| | | | | | | | | | | | | | | Further tighten the check for non-virtual slots overwritten in Python by checking that the QMetaObject actually returns a different declaring class. This works around the underlying issue that the logic automatically creating meta methods for non-decorated slots wrongly adds the entry to the derived class. Amends f048d13b4f042b04d94007fba951ed3080ccf8c9. Task-number: PYSIDE-2418 Fixes: PYSIDE-2487 Pick-to: 6.6 6.5 Change-Id: I0c62cfd9fd6dcb2ddf6bcfd1db14aa274293b34f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Get rid of tp_dict in general, amendedChristian Tismer2023-10-111-3/+3
| | | | | | | | | | | | | | | | | | A few more cases of cppgenerator were added. This are now really all cases, because tp_dict is no longer exported. As a very positive side effect, there is no longer direct tp_dict access in the "init_<type>" functions. Usage of PepType_GetDict would have created a permanent extra-reference. NOTE: It was necessary to set SKIP_UNITY_BUILD_INCLUSION on pep384impl.cpp in order to let this work with unity. Change-Id: I021dbc978b51265db96d5d3d438e06aa96230cc1 Pick-to: 6.2 6.5 6.6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken: Get rid of tp_dict in generalChristian Tismer2023-10-093-20/+29
| | | | | | | | | | | | | | It is a long due task to finally remove the direct access to type object fields. With Python 3.12, direct access to tp_dict became problematic. We use that as a reason to start removing the direct access in favor of function calls. Task-number: PYSIDE-2230 Change-Id: I6f8a7479ab0afdbef14d4661f66c3588f3a578aa Pick-to: 6.2 6.5 6.6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Support running PySide on Python 3.12Christian Tismer2023-10-093-9/+12
| | | | | | | | | | | | | | | | | | Builtin types no longer have tp_dict set. We need to use PyType_GetDict, instead. This works without Limited API at the moment. With some great cheating, this works with Limited API, too. We emulate PyType_GetDict by tp_dict if that is not 0. Otherwise we create an empty dict. Some small changes to Exception handling and longer warm-up in leaking tests were found, too. Pick-to: 6.6 6.5 6.2 Task-number: PYSIDE-2230 Change-Id: I8a56de6208ec00979255b39b5784dfc9b4b92def Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* libshiboken/libpyside: Fix special functionsFriedemann Kleint2023-10-067-1/+19
| | | | | | | | Pick-to: 6.6 Task-number: PYSIDE-2479 Change-Id: I6df19d487be7087f17e37bea3ea30a66e9b24ed7 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* libshiboken: Deprecate cast operators of AutoDecRefFriedemann Kleint2023-10-051-2/+3
| | | | | | | | | | | | | | | For the non-limited API case, there was a cast to PyTupleObject * required for argument tuples due to the PyTuple_GET_ITEM() macro definition. Replace it by calling object(). Also deprecate the universal cast function. [ChangeLog][shiboken6] Cast operators of the helper class AutoDecRef have been deprecated. Pick-to: 6.6 Task-number: PYSIDE-2479 Change-Id: Iff660fbc791b1a74ecbd247e71edc896767f308d Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Replace QPair by std::pairFriedemann Kleint2023-09-292-4/+5
| | | | | | Pick-to: 6.6 6.5 Change-Id: Ic64a2a2c162c54fbbfb6ddc5004ffe1944bfd37a Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Avoid some string conversionsFriedemann Kleint2023-09-272-4/+6
| | | | | | | | | 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>
* Refactor signal helper extractFunctionArgumentsFromSlot()Friedemann Kleint2023-09-271-78/+68
| | | | | | | | | | | | | Replace out parameters by a struct and streamline code accordingly. Return the function name as a PyObject to be able to delay the conversion. Fix some implicit bool conversions along the way. Pick-to: 6.6 6.5 Task-number: PYSIDE-229 Task-number: PYSIDE-2423 Change-Id: I0dcf14f5b719529117c0ccc119fb19802b399a35 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> 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-206-11/+11
| | | | | | | 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-2010-20/+17
| | | | | | | | | | | | - 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>