aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/libshiboken/signature_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Replace typedef by usingFriedemann Kleint2023-09-201-3/+3
| | | | | | | 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>
* Signature: Move all initialization into InitSignatureStringsChristian Tismer2023-08-311-0/+1
| | | | | | | | | | | | | | | | | | | | | The signature module built its own mapping for static methods. This was a post process after a module was imported. All other mappings worked from alone. Unfortunately, by lazy loading all classes of a module, the final enumeration of all functions comes too early and does no more find anything because the classes and their methods are initialized later. Move this functionality right at the end of InitSignatureStrings. This cleanup is generally a simplification and applicable for earlier versions. Task-number: PYSIDE-2404 Change-Id: Id6af49278fb8c90920eda9f9734e5231a5a2e2bd Pick-to: 6.5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* __feature__: heavily rework the context switchingChristian Tismer2022-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The example of the issue shows the qasync.py module which fails miserably when using snake_case. The reason: ----------- Reason is the way how feature switching is implemented. Modules like qasync get a default switching of "ignore". This ignores that the qasync module itself imports QtCore, and feature switching is of course relevant, suggesting a default setting of "normal" (explicitly no features). The real problem: ----------------- Testing the simple approach showed a serious problem with feature switching: The functions get switched when a certain function (getattr etc.) is called. But the switching is sometimes not done due to a caching problem. This fix removes caching that was wrong. Optimization will be done in a different step with a different approach. This Change was not qasync specific, but happens with PySide imports. Actions done: - adjust the inline structure - implement a feature_imported callback - identify Python functions that use PySide during import [ChangeLog][PySide6] __feature__ switching now works even with recursive imports like in the qasync module. Fixes: PYSIDE-2029 Change-Id: I3340f54f293083a09fb509383688f73bbd9b60ae Pick-to: 6.4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Shiboken: Rewrite the signature initializationChristian Tismer2022-07-071-2/+1
| | | | | | | | | | | | | | | [ChangeLog][shiboken6] The initialization of the signature module was moved into Shiboken and rearranged. This was necessary for the new backward-compatible PyEnum module. This change makes even sense if the PyEnum forgiveness should not work in 3.11 because it is a real cleanup. Change-Id: I5de54584154fb43648617adcac823f42049be57b Pick-to: 6.3 Task-number: PYSIDE-1735 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Use SPDX license identifiersLucie GĂ©rard2022-05-271-38/+2
| | | | | | | | | | | 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>
* Fix toplevel CMake buildFriedemann Kleint2022-03-211-0/+113
Move signature_p.h one level up next to signature.h so that it is found in the same relative location independent of whether it was installed. This also makes it visible for Qt Creator. Pick-to: 6.2 Fixes: PYSIDE-1862 Change-Id: I9c7ebda6a6e521efb6841b3dd453dbd1941f312b Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>