aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6
Commit message (Collapse)AuthorAgeFilesLines
...
* PySide6: Add __repr__ to QEventsFriedemann Kleint2022-01-214-11/+119
| | | | | | | | | | | | | | Add a basic __repr__ function to QEvent that shows the type enumeration value. For QtGui, use the debug operator from qevent.h for the relevant events. Add a generic template for using QDebug with module name. [ChangeLog][PySide6] __repr__ functions for some QEvent-derived classes were added. Task-number: PYSIDE-1788 Pick-to: 6.2 Change-Id: I02aca4c98cf3ebd69558103c7d23660d1eb840fb Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Adapt to new Multimedia-APIFriedemann Kleint2022-01-191-0/+3
| | | | | | | | | | | | | | | | | | - Add enum Loops to QMediaPlayer (qtmultimedia/23333fb4be2293ceaf129fec134ea687a30596d9) - Add enum RotationAngle to QVideoFrame (qtmultimedia/7fa8e82f1dcef6e983fbf25d7c07a1bc86957fea) - Add enum AudioChannelPosition to QAudioFormat (qtmultimedia/83e9c2d8c3b278bae81a6060cc1657a95250f1ee) Since the changes appear in 6.2, too (due to Multimedia being a tech-preview), add a pick-to. Task-number: QTBUG-95010 Pick-to: 6.2 Change-Id: Ie91250de143e8a77c2251aa25ab4c7665e4e8843 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add new 6.3 APIFriedemann Kleint2022-01-192-0/+2
| | | | | | | | | | - Add enum TransportMedium to QNetworkInformation (qtbase/7fb855e175df6aa5937b00ea05312cf7ed323afa) - Add enum AceProcessingOption to QUrl (qtbase/4bf3010378b41148c1bd7ded51b15ffc00fc8af3) Change-Id: I8dbc3b2de43ddf2ba19a06dec0f8afbf12010b26 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix warnings about QOperatingSystemVersionBaseFriedemann Kleint2022-01-181-2/+2
| | | | | | | | | | | | | | | | | | Since QOperatingSystemVersion has static public fields of type QOperatingSystemVersionBase, since qtbase/3446313c7a5cd6005089866a7b20c9f28e132a0a, it should be handled as a value type. Partially revert d0771feb7d6815ad1f2611c1accaa92e4aad73b5, making QOperatingSystemVersionBase a value type again, which is now possible due to the fixed handling of value types with protected constructors. Fix warning <frozen importlib._bootstrap>:219: RuntimeWarning: CopyCppToPython(): SbkConverter::copyToPython is null for "PySide6.QtCore.QOperatingSystemVersionBase". Change-Id: I21970af1a023fc34108435bf8981ba3df3b80139 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix build against Qt 6.3 without protected hackFriedemann Kleint2022-01-131-2/+3
| | | | | | | | | | | | | QOperatingSystemVersionBase has no default constructor, causing problems without protected hack (see qtbase/3446313c7a5cd6005089866a7b20c9f28e132a0a). Make it an object and delete some functions. Amends dac29fa765d13301ebe7f94aeee08e9ef10d2474. Change-Id: I0e3a18ccc2ad6423c4480b1c334234505ad60036 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Adapt to the QWidget/addAction changes in 6.3Friedemann Kleint2022-01-132-112/+169
| | | | | | | | | qtbase/08e4d2db084f6abbf1840ffb694b15bd215ad069 moved the addAction() functions from QToolBar/QMenuBar and QMenu to QWidget. Change-Id: Ifcfe3743328712c5d0f1f5700a708c35838ead07 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add QXYSeries PointConfiguration enumCristián Maureira-Fredes2022-01-131-0/+1
| | | | | | | | | | The 'PointConfiguration' enum was missing, disabling the generation of all the methods that were using it. Fixes: PYSIDE-1770 Pick-to: 6.2 Change-Id: Id64889e8058dfdf2d5b7734c767d24bad1fa8d08 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide6: Fix crashes in WebEngine signal emissionsFriedemann Kleint2022-01-111-3/+3
| | | | | | | | | | | | | There seems to be a problem with signals with object type parameters. Change QWebEngineCertificateError and QWebEngineFullScreenRequest (gadgets) to be value types. Pick-to: 6.2 Fixes: PYSIDE-1768 Fixes: PYSIDE-1769 Change-Id: I9863f9e26a9a7bf7751369057fcad6eb10798817 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add a __repr__ function for QMetaObjectFriedemann Kleint2022-01-062-0/+9
| | | | | | | | This is helpful for QML debugging. Task-number: PYSIDE-1709 Change-Id: If9baeb5a52999c4718e951f0ea5736783a9fcbff Reviewed-by: Christian Tismer <tismer@stackless.com>
* mypy-support: Add a stub file for __feature__ importChristian Tismer2022-01-042-0/+48
| | | | | | | | | This allows to use "from feature import" when using mypy. Task-number: PYSIDE-1675 Change-Id: Ia2a5d27d1489df2af5136a2ad2af072eb089b66f Fixes: PYSIDE-1754 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* AudioSource Example + Binding for QAudioFormat.normalizedSampleValue(data: ↵Shyamnath Premnadh2021-12-281-0/+8
| | | | | | | | | | | | | | | | | | | | bytes) In order to make the AudioSource example available in Python, the following functions were properly exposed to Python. - normalizedSampleSource(const void* data) const in QAudioFormat Previously, Shiboken took care of exposing these functions on its own. The fix here is to use PyBuffer as the counterpart for const char* in the Python side. The patch also consists of the working AudioSource example. Currently only the Push Mode works. Inorder to make the pull mode work, the function writeData(const char* data, qint64 len) should be properly exposed from C++ to Python through typestem, without code duplication. Task-number: PYSIDE-841 Task-number: PYSIDE-1743 Pick-to: 6.2 Change-Id: I1cd2c28136836c9bdf1021693f74e59eb98f390b Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6: Fix QQmlApplicationEngine.load(str) to not construct a QUrlFriedemann Kleint2021-12-151-2/+4
| | | | | | | | | | | | | | Specify the overload number so that string is checked first. Add a test since QQmlApplicationEngine is not yet tested. Amends 2cc81fd5e63bf931d8c9d1c8c2c66ac9e16ef087. Pick-to: 6.2 Fixes: PYSIDE-1736 Task-number: PYSIDE-1499 Change-Id: I1736928f1acf17fda5671bd11d16c5017141f1ff Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Add some missing class and enums for Qt 6.3Friedemann Kleint2021-12-092-3/+16
| | | | | | | | | | | | | | | Add QOperatingSystemVersionBase, adapting to qtbase/3446313c7a5cd6005089866a7b20c9f28e132a0a. Add some enums. Suppress warning for QRandomGenerator::System since that is internal. Change QIODeviceBase to a value type, adapting to qtbase/dca63b6ef68c6bdaecad38db71295c5a0507914f Change-Id: Ibc148021c62d607dd1cc6b8928e8f455819c2aa2 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix build when Vulkan is not installedFriedemann Kleint2021-12-081-2/+15
| | | | | | | | | | | | | | The Qt headers define some dummy types for Vulkan types that take effect when Vulkan is not installed. This causes QQuickRenderTarget::fromVulkanImage() and some other functions to be declared with no linkage, causing a link error in PySide. Reject the function (which happens in the normal case since VKImage is not known to shiboken). Suppress the warnings in the normal case. Pick-to: 6.2 Fixes: PYSIDE-1726 Change-Id: I915b477280bac5200c8206a7f9044b78c80e2936 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Move the mutex for locking QObject allocation helpers to libpysideFriedemann Kleint2021-12-081-5/+2
| | | | | | | | | | Qml and Quick were using 2 different mutexes, which does not make sense. Task-number: PYSIDE-1709 Change-Id: Id0ec0f780c1d24e40a7f072dea62964ecf92e9d2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Pyside6: Move the QuickRegisterItem helpers into libpysideqmlFriedemann Kleint2021-12-082-2/+3
| | | | | | | | | libpyside had some variables that were only used by Qt Qml/Quick. Move them into libpysideqml. Task-number: PYSIDE-1709 Change-Id: I8d794c1149bc35f5bd0d8c6aec9b222bb7f73bf5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libpysideqml6: Use the namespace PySide::Qml consistentlyFriedemann Kleint2021-12-081-9/+9
| | | | | | Task-number: PYSIDE-1709 Change-Id: I03458bf72c2b2d37e71d16755c6a32470fb5f5e3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Move the QML registration code into a libraryFriedemann Kleint2021-12-0812-1409/+6
| | | | | | | | | This makes the code easier to maintain. Task-number: PYSIDE-1709 Change-Id: Idb75143a7e6d218637ab75463db88b6135cd4086 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix dependencies of QtQuick3DFriedemann Kleint2021-11-301-1/+1
| | | | | | | | | | | | | Fix error: QtQuick3D/pyside6_qtquick3d_python.h:50:10: fatal error: pyside6_qtquick_python.h: No such file or directory 50 | #include <pyside6_qtquick_python.h> Amends b9ec49942b3ad53343317e631320c58e59736c22. Pick-to: 6.2 Fixes: PYSIDE-1708 Change-Id: I0de9400c9db582a21d8e3e9f859e1e2246fb8328 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QtQuick3D moduleCristián Maureira-Fredes2021-11-292-0/+114
| | | | | | | | | | | | Adding the module that contains a few C++ classes. Adding the 'intro' example. Adding the 'customgeometry' example as well. Pick-to: 6.2 Fixes: PYSIDE-1708 Change-Id: I0681f087e74c13c024bb1dfa8de545b30f95d7d8 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* libpyside: Split up the pyside.h headerFriedemann Kleint2021-11-266-2/+31
| | | | | | | | | | | | | | | | Changing something in pyside.h caused excessive recompiling of all wrappers. Try to amend the situation by splitting up the header and include only what is needed. pyside.h remains as a header including the others which will be emptied out by further changes splitting out QML functionality. [ChangeLog][PySide6] The header pyside.h has been split into smaller headers. Task-number: PYSIDE-1709 Change-Id: I89ff3d9d9bc486f194ad3ec62ed372ff0be960f2 Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6: Fix build after header rearrangementFriedemann Kleint2021-11-261-0/+3
| | | | | | | | | | | | | qtbase/b55957b9048abf86a5719dd740c4dc0574566e21 removed qproperty.h from qobject.h, causing errors about missing Qt::beginPropertyUpdateGroup(), Qt::endPropertyUpdateGroup() from qtbase/fdedcb6ec650236bef4a8c8f005b5dd24ef7d77a. Fix by including the header. Pick-to: 6.2 Change-Id: I70ee0449c1cb1aedccd35b6e470cd33af4b5fba1 Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6: Move some code from the core snippets into a static source fileFriedemann Kleint2021-11-245-206/+376
| | | | | | | | | Split out code which does not use any code snippet placeholders into a separate source file for better maintainability. Change-Id: Id8d923b8faf58783f28e56b4bf4397117c39c51b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6: Move QObject signal connection code into libpysideFriedemann Kleint2021-11-231-232/+9
| | | | | | | | | | The rather large functions should not be in code snippets. Move them into libpyside and rearrange and streamline them a bit, fixing some potential null pointer crashes as pointed out by clang checking. Change-Id: I5be6468577f2a107a286775c7e8b5874531c30fe Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* libpyside6: Add a convenience function to convert a PyObject * to a QObject *Friedemann Kleint2021-11-231-8/+3
| | | | | | | Pick-to: 6.2 Task-number: PYSIDE-1709 Change-Id: I137d7fd3ac84f50bb6a799e27e07b7523d943812 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Decouple pysidequickregistertype.cpp from the generated wrapper classesFriedemann Kleint2021-11-191-29/+26
| | | | | | | | | | | | | | The registering code determined the size of the generated wrapper class by using sizeof() on them. Replace that by PySide::getSizeOfQObject() as is done in pysideqmlregistertype.cpp. Remove the macro PY_REGISTER_IF_INHERITS_FROM. With that, the code can be moved into a library. Task-number: PYSIDE-1709 Change-Id: Id000a9afec8e94294d92a9d7c6e01fd4d2bf4c37 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PyPySide: disable feature switching to enable the pyi generationChristian Tismer2021-11-191-6/+9
| | | | | | | | | | | | | | The __feature__ switching does not work yet in PyPy. More importantly, the current implementation uses object identity on small numbers which PyPy does not have. [ChangeLog][shiboken6] Feature switching is disabled in PyPy, allowing .pyi generation to be enabled, now. Task-number: PYSIDE-535 Change-Id: I6fc7ef538007273b53d560bbf40bf46108b2bd82 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Add a sequence protocol for QRegionFriedemann Kleint2021-11-192-0/+20
| | | | | | | Pick-to: 6.2 Fixes: PYSIDE-1714 Change-Id: I581e8088e25ab31afdfc6cd5a15c55a5b418ffdc Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6: Remove old QtQuick registering codeFriedemann Kleint2021-11-191-53/+0
| | | | | | | Pick-to: 6.2 Task-number: PYSIDE-1709 Change-Id: Iea46ee2c8f4a7d9fd117a3a95adf5e379803a6eb Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* pysideqmlregistertype.cpp: Fix compilation with QT_NO_CAST_FROM_ASCIIFriedemann Kleint2021-11-191-1/+1
| | | | | | | | | | Properly convert noCreationReason, preparing for moving the code into a library. Pick-to: 6.2 Task-number: PYSIDE-1709 Change-Id: I795bf0be22e192cd8abeed628e1a545429acb9cd Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Fix build against Qt 6.2.1Friedemann Kleint2021-11-161-0/+1
| | | | | | | | | | | | | | Fixes: 6.2.1/gcc_64/include/QtQml/6.2.1/QtQml/private/qtqmlcompilerglobal_p.h:54:10: fatal error: QtCore/private/qglobal_p.h: No such file or directory Amends 346a4a86fc2d7064e44c0766dd08374d652cdcc1. Add an include path for the QtCore private headers. Task-number: PYSIDE-1709 Pick-to: 6.2 Change-Id: I3189d4d9fe05e038634af1d0ef7bc66c16be7aab Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add a QmlSingleton decoratorFriedemann Kleint2021-11-164-9/+44
| | | | | | | | | | Add a simple decorator function that stores the type in a list for the QmlElement decorator to use singleton registration. Task-number: PYSIDE-1709 Pick-to: 6.2 Change-Id: I075d583404bd60dc52b84c23a3d09e50d32a5a3a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add a QmlUncreatable decoratorFriedemann Kleint2021-11-156-1/+273
| | | | | | | | | | | Add a class type that stores the reason and registers the type in the call operator. This is then queried by the register type helper functions. Pick-to: 6.2 Task-number: PYSIDE-1709 Change-Id: I0dd0c4c1e05e6e0ee6f22a6947b85546fc373fb9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* PyPySide: check in the rest of PyPy changesChristian Tismer2021-11-121-1/+2
| | | | | | | | | | | | | | | | | | | The PyPy branch has been apart from the main branch for a long time. Meanwhile, almost everything has settled and can be merged into the main branch. This has the advantage of a single branch for both configurations. This project is still not ready. It will be called ready when the Mandelbrot example can be run without any changes. To achieve that, the current threading problem must be solved. The WIP branch is kept. It now holds only the pypy-blog.txt file. Task-number: PYSIDE-535 Change-Id: I317b0e921cc6810e1b76c69991a0f8e592135c65 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide6: Remove QML dependency from libpysideFriedemann Kleint2021-11-115-0/+158
| | | | | | | | | | | | | | Remove the QML error handling from SignalHandler by introducing a function pointer for this which can set from the QML module. This allows for removing QtQml from the libpyside dependencies, removing the need to deploy the QtQml libraries with widget applications. [ChangeLog][PySide6] libpyside no longer depends on QtQml. Change-Id: Iae7dabdd38ea03156f4c00073d84e42ec5a3d892 Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6: Remove QML includes from pyside.hFriedemann Kleint2021-11-112-4/+4
| | | | | | | | | | | Forward-declare QQmlPrivate::RegisterType. This requires adding some includes in dependent modules. [ChangeLog][PySide6] pyside.h no longer includes QML headers. Pick-to: 6.2 Change-Id: I7d7b703d46e45adbb714d817f05b5480b35d4a4c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Add a QmlAnonymous decoratorFriedemann Kleint2021-11-104-6/+46
| | | | | | | | | | Split out a helper from the qmlElementMacro() to register (also preparing for uncreatable types) and add the decorator. Pick-to: 6.2 Change-Id: I0f3ebf6f31c141083440abcc9f1acd227ce046d7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Decouple pysideqmlregistertype.cpp from generated headersFriedemann Kleint2021-11-0910-442/+701
| | | | | | | | | | | | | | | | | | | Split out QtQml_VolatileBoolType and QtQmlListProperty into separate files. QtQml_VolatileBoolType still requires the generated header and therefore needs to remain a static source of the QtQml module. In pysideqmlregistertype.cpp and the newly added pysideqmllistproperty.cpp, retrieve the required type objects by name lookup from libshiboken instead of accessing the arrays of the generated headers. With that, the generated headers are no no longer required and they can be moved to libpyside or another extension library at some point. Pick-to: 6.2 Change-Id: I9bbc880c58e38d8a623723d64e56b16574a1eb86 Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6: Convert QSet to PySetFriedemann Kleint2021-11-081-2/+1
| | | | | | | | | | | | QSet instances were historically converted to PyLists. Change it to be converted to a PySet. Since both are iterable, this should have no impact on client code. [ChangeLog][PySide6] On return, QSet instances will be converted to a PySet instead of a PyList. Change-Id: I77e81473c651ff370ce5af9a8a87ba23edb02eab Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Make common standard containers built-inFriedemann Kleint2021-11-081-14/+0
| | | | | | | | | | | | | | | Extend the type system parser to be able to extend the default typesystem by specifying a type system without name and use that to add snippets for some common standard containers using the predefined templates. [ChangeLog][shiboken6] Common standard containers (std::list/std::vector/std::pair/std::map/std::unordered_map) are now built-in unless they were present in type system file. Fixes: PYSIDE-1666 Change-Id: I045810d36466c7c27a53d4ee9bc167c5019a2378 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Add predefined templates for standard container type conversionFriedemann Kleint2021-11-083-168/+37
| | | | | | | | | | | | | | | | | | | | | | | Add some predefined XML templates with common conversions for various container types (STL and Qt) and PyLong. Remove the primitive type QModelIndexList since QModelIndexList is just a typedef. As a drive-by: - Fix a bug in cppmultihash_to_pymap_conversion which would not handle multiple keys correctly (insert several times due to iterator kit not moved past the range). - Simplify the pySequenceToCppContainer conversion by using PyIter_Next(). [ChangeLog][shiboken6] Pre-defined XML templates for standard container type conversion have been added. Task-number: PYSIDE-1666 Change-Id: Ic2e36a75f26853651718e27e0788a37519393322 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* PySide6: Add a __repr__ method for QQmlErrorFriedemann Kleint2021-11-052-1/+10
| | | | | | | | This is handy for debugging QML. Pick-to: 6.2 Change-Id: Ic9c98a27377416debaa41ab1f95b3b10db4f143d Reviewed-by: Christian Tismer <tismer@stackless.com>
* Allow threads in QtGui.QTextDocument.print_Christian Tismer2021-11-051-1/+1
| | | | | | | | | | | | Reaction on a question on IRC (Vincent Michel @vxgmichel Nov 03 14:30) Change-Id: I979dc2ccb110835daec2904e3c62715deb9c7f08 Pick-to: 6.2 Pick-to: 5.15 Task-number: PYSIDE-803 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken6: Remove ShibokenGenerator::guessScopeForDefaultValue()Friedemann Kleint2021-11-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move resolving of class fields and enum values as argument default values into AbstractMetaBuilder. Handling of static class field constants was spread between AbstractMetaBuilderPrivate::fixDefaultValue() and ShibokenGenerator::guessScopeForDefaultValue(). The former was handling it for arguments of non-primitive type only and not completely expanding namespaces. The latter was handling it for arguments of primitive types, too, but also added some code for non-static fields, which cannot be used as default arguments in C++. ShibokenGenerator::guessScopeForDefaultValue() was handling enum values for primitive and values, excluding macros by regex, but otherwise not checking if the term is really an enum value. Rewrite the code in AbstractMetaBuilderPrivate::fixDefaultValue() without regexes for clarity, let it check fields and enum values correctly via code model and fully expand namespaces. Add tests. Adapt the signature module to the now fully qualified signatures. [ChangeLog][shiboken6] When qualifying function argument default values for the generated code, shiboken no longer considers each identifier it cannot otherwise find as an enum value and no longer adds the class scope to it. This may require manually adding some replace-default-expression modifications. Task-number: PYSIDE-1691 Pick-to: 6.2 Change-Id: Id4cd2ca1f91db8c1663d7fc31e4b4ef72a5690f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix QIcon.addPixmap() to accept a PyPathLike argumentFriedemann Kleint2021-10-272-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By modifying functions to accept a PyPathLike argument, we saw the side-effect of disabling implicit conversions. In an alternative branch, we tried to re-enable implicit conversion by adding new functions with a PyPathLike argument. This worked, but had drawbacks: * the signatures become redundant, and some post-processing must be implemented * the implicit conversion works fine, but only with a string argument. Much better would be to supply a PyPathLike This patch leaves the modifications of function arguments and simply adds the missing icon.addPixmap(PyPathLike). Other implicit conversions which might be found missing should be added the same way. [ChangeLog][shiboken6] The implicit conversion of icon.addPixmap(str) was replaced by an explicit version which takes PyPathLike. Change-Id: I48a2887e28473718f027059df2aafdd516f66dc3 Fixes: PYSIDE-1669 Task-number: PYSIDE-1499 Pick-to: 6.2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide6: Simplify rename-to/replace-default-expression in typeystem filesFriedemann Kleint2021-10-255-74/+14
| | | | | | | | | Remove unneeded values or specify them in the add-function signature. Pick-to: 6.2 Change-Id: I9561432f7aedb56d796496d338d2bf660e30c17c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Add QCborTagFriedemann Kleint2021-10-201-0/+1
| | | | | | | | Fixes: PYSIDE-1691 Pick-to: 6.2 Change-Id: I023b4ffe280b431d883673f5120236ba3f9c0991 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Fix constructing a QFont from a family stringFriedemann Kleint2021-10-121-0/+3
| | | | | | | | | | | Change qtbase/d8602ce58b6ef268be84b9aa0166b0c3fa6a96e8 added QFont(QStringList) which now triggers for strings as well since they are a sequence. Fix by specifying overload numbers. Pick-to: 6.2 Fixes: PYSIDE-1685 Change-Id: Ic78c2b273fe81949f852ea6e0f578613bc0a623a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Add qmlRegister functions taking a library URLFriedemann Kleint2021-10-111-0/+2
| | | | | | | Fixes: PYSIDE-1631 Pick-to: 6.2 Change-Id: I082c3576c24f772190cc103da787311b43acf88c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Fix hang in QQmlApplicationEngine functions with message handlerFriedemann Kleint2021-10-071-1/+6
| | | | | | | | | Add allow-thread. Pick-to: 6.2 5.15 Fixes: PYSIDE-1681 Change-Id: I624979c5845a3366bcd9d7827ff2c77438ec54f3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>