aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix audio_test.py on Kubuntu 22.04Friedemann Kleint2024-07-031-1/+9
| | | | | | | | | The audio device returned an unknown format as preferred one, build a minimal format. Pick-to: 6.7 Change-Id: Ib9a4db805d2993575aaed066de2ab7e123409f88 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Avoid parenting of QNetworkReply on QNetworkAccessManager in request functionsFriedemann Kleint2024-07-021-6/+50
| | | | | | | | | Suppress return value heuristics for them. Pick-to: 6.7 Task-number: PYSIDE-1057 Change-Id: Id249d8c769f808600545f7a48861bd4fe7eae6fe Reviewed-by: Christian Tismer <tismer@stackless.com>
* Avoid parenting of QModbusReply on QModbusClient in the request functionsFriedemann Kleint2024-07-021-1/+22
| | | | | | | | | Suppress return value heuristics for them. Pick-to: 6.7 Task-number: PYSIDE-2793 Change-Id: I4ebf8c971b02fb00b9c6658b02157eb26d71f418 Reviewed-by: Christian Tismer <tismer@stackless.com>
* QtAsyncio: Use modern typing syntaxAdrian Herrmann2024-06-284-87/+81
| | | | | | | | | | | We can already use the modern typing syntax introduced with Python 3.10 in 3.9 via future statement definitions, even before we raise the minimum Python version to 3.10. Task-number: PYSIDE-769 Task-number: PYSIDE-2786 Change-Id: I560d0c25f3503217f920906a5b26193282b0247b Reviewed-by: Christian Tismer <tismer@stackless.com>
* QtAsyncio: Properly document run() argsAdrian Herrmann2024-06-271-1/+19
| | | | | | | | | Properly document the arguments to QtAsyncio.run() with a docstring instead of leaving it only to the module rst. Task-number: PYSIDE-769 Change-Id: Ia4d63b3cdf81d052203a2752ed3ca6cb0b40f814 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QtAsyncio: Remove application arg from loop policyAdrian Herrmann2024-06-273-8/+10
| | | | | | | | | | | | | Remove the optional application argument from the constructor of QAsyncioEventLoopPolicy, as it is unnecessary. If a QCoreApplication or other type of qApp was created outside of QtAsyncio, it will always be retrieved by QCoreApplication.instance(), and therefore passing it as an argument makes little sense. Task-number: PYSIDE-769 Change-Id: Iac7a913a1c9d6ebbb0984fe11f8b5cda955baab1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add warning when adding a Python-declared property failsFriedemann Kleint2024-06-271-2/+17
| | | | | | Pick-to: 6.7 Change-Id: I3b460f270965706a1b8ed04ef6f51d540db3ba72 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Desktop Deployment: Update Nuitka to 2.3.7Shyamnath Premnadh2024-06-262-3/+3
| | | | | | | | | | | | - Fixes sporadic crashes with Python 3.12 - Supports Numpy 2.0. This is not relevant for us currently, but it's good to have the latest version. Pick-to: 6.7 Fixes: PYSIDE-2781 Task-number: PYSIDE-1612 Change-Id: I96a437795018792906ba6cf44e6466dacc154dbf Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6/QML: Fix Qt properties of type QAbstractItemModelFriedemann Kleint2024-06-261-1/+2
| | | | | | | | | | | Add a metatype registration for the class for them to work. [ChangeLog][PySide6] Properties of type QAbstractItemModel can now be used in QML. Pick-to: 6.7 Change-Id: I3c0c08175a09f1decb00726b65edc73746fa71a7 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* shiboken6: Prevent converter name clashes between classes and partially ↵Friedemann Kleint2024-06-267-3/+61
| | | | | | | | | | | | | | | | | | | | | qualified aliases Change the behavior of registerConverterName() to always overwrite existing entries. It should then only be used for fully qualified names. Add a function registerConverterAlias() which does not overwrite existing entries for registering partially qualified names. Use registerConverterAlias() for the primitive types since they are re-registered in multiple modules. This prevents clashes when registering duplicate classes. For example, registering a globally scoped class "Connection" will then overwrite the partially qualified alias "Connection" of "QMetaObject::Connection". Fixes: PYSIDE-2792 Change-Id: I2bd3c0bff96da6d3ceddd46a2368fe6b94bbed68 Reviewed-by: Christian Tismer <tismer@stackless.com>
* libpyside: Add explanatory comment about methodsFriedemann Kleint2024-06-241-2/+6
| | | | | | Pick-to: 6.7 Change-Id: I0731c9c02de928dcdf268f5fc773148363b9a8fe Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpysideqml: Fix static analysis warningsFriedemann Kleint2024-06-246-19/+21
| | | | | | | | | | | - Initialize variables - Use auto * - Use nullptr - Remove repeated return types - Minor cleanups Change-Id: I26cacce81a4c8ebc885f8c34d59fdac5d0026af9 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpyside: Fix static analysis warningsFriedemann Kleint2024-06-2418-165/+175
| | | | | | | | | | | | | | | | - 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>
* Python-3.10: Allow the new syntax for Python 3.9Christian Tismer2024-06-20607-0/+608
| | | | | | | | Add a future statement to all Python source files. Task-number: PYSIDE-2786 Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Add shibokenmodule dependency for all _pyi modulesŁukasz Patron2024-06-191-0/+4
| | | | | | | | | | | | | | When building on Fedora rawhide, we sometimes end up running generate_pyi.py script while shibokenmodule is still being built, resulting in the following error message: ImportError: (...)/Shiboken.cpython-313-x86_64-linux-gnu.so: file too short Pick-to: 6.7 Change-Id: I500679bf12e4ba5a820db6c7971f8cdb0012b965 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Łukasz Patron <priv.luk@gmail.com>
* QtAsyncio: Clarify usage of singleShot w/o contextAdrian Herrmann2024-06-181-1/+4
| | | | | | | | | | | The singleShot overload that accepts a context argument was used inside the do() method of the QAsyncioExecutorWrapper class, but this usage was unnecessary and adds confusion. Task-number: PYSIDE-769 Change-Id: Idcdd99eda6ae3bfd11ec50b9a42ff15ade005cc9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Qt Designer plugin: Remove Python version checkFriedemann Kleint2024-06-181-16/+22
| | | | | | | | | | Pre 3.8 is no longer supported. Move the code into a static helper for macOS only. This also fixes analyzer warnings about ignoring return codes. Pick-to: 6.7 Change-Id: Idd1a53729152f132958f94d288c13ac4399b6c78 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libshiboken: Fix some static analysis warningsFriedemann Kleint2024-06-181-0/+1
| | | | | | | | | | | | - Initialize variables - Use auto * - Use range-based for - Move '#include "sbktypefactory.h"' from basewrapper.h to shiboken.h (for use by the generated code) - Fix some int types (Py_ssize_t/size_t) to avoid lossy conversions Change-Id: I7cc8b33850afcd07cc8f9a115e56a77cbacd58b0 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix some documentation warnings and broken linksFriedemann Kleint2024-06-172-11/+11
| | | | | | Pick-to: 6.7 Change-Id: I5fbc1be390c7d24ef7f204721cd060e5d61c88e0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Nuitka Deployment Doc - remove non-relevant sectionShyamnath Premnadh2024-06-171-13/+0
| | | | | | | | | - Not relevant with the latest Nuitka version that we use with pyside6-deploy Pick-to: 6.7 6.5 6.2 Change-Id: Id3e9cc5bcad678cb00a1b6049c740c5e321fbdde Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Deployment Docs: Add instructions to generate a bug reportShyamnath Premnadh2024-06-171-0/+26
| | | | | | | | | | - Additionally, remove some comments from default.spec that are not relevant anymore. Pick-to: 6.7 Task-number: PYSIDE-1612 Change-Id: Iea2fed95507b6e649285e409cf8678287bf15a56 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Do the transition to Python 3.13, GIL-partChristian Tismer2024-06-121-12/+29
| | | | | | | | | | | | | * opcodes have changed numbers. That made "import *" etc. fail. * PUSH_NULL is sometimes inserted before a call. * enum_test needed an overhaul due to opcode changes. Python 3.13 works fine. Supporting --disable-gil is a different issue. Task-number: PYSIDE-2751 Change-Id: I37b447148787e2923a58c091a5c8ac808d579bc0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Desktop Deployment: Update Nuitka to 2.3.2Shyamnath Premnadh2024-06-112-2/+5
| | | | | | | | | | - Full support for Python 3.12 - Experiemental support for Python 3.13 Pick-to: 6.7 Task-number: PYSIDE-1612 Change-Id: Ib4699351ec4105de756b4ac16cd7b3a49054a614 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Desktop Deployment: Enable Nuitka --standalone modeShyamnath Premnadh2024-06-102-0/+16
| | | | | | | | | | | | | - enables the standalone mode of Nuitka for pyside6-deploy - the mode can be set either through the command line or the config file - adapt tests - update documentation Pick-to: 6.7 Fixes: PYSIDE-2622 Task-number: PYSIDE-1612 Change-Id: I5a10c857d3e79174d2643139eb2e4f7b5e10d955 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken: Fix a warning crash that is present in Python 3.13Christian Tismer2024-06-071-0/+3
| | | | | | | | | | | | This problem is new shown in Python 3.13 although this was not correct before. We need to remove the error before issuing a warning. Task-number: PYSIDE-2751 Change-Id: Ie4572e043388ca3f87092ea886e935b583f871b4 Pick-to: 6.7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Android Deployment: Build wheels with macOS hostShyamnath Premnadh2024-06-033-7/+50
| | | | | | | | | | | | - Additionally, also move setting Python_SOABI manually for Android to where FindPython CMake module is called. This also aids in naming the wheel correctly. Pick-to: 6.7 Task-number: PYSIDE-2766 Change-Id: I73c089d31e2ee629f3ed676965fca27d53882110 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QtAsyncio: Improve documentation (part 3)Adrian Herrmann2024-05-301-5/+14
| | | | | | | | | | Improve the inline documentation of QtAsyncio with more comprehensive comments. Pick-to: 6.7 Task-number: PYSIDE-769 Change-Id: Ia25bab88de3cb66178ced15fe3b2a4d35e9c09a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* pyi: Fix checking errors on the property decoratorFriedemann Kleint2024-05-291-0/+1
| | | | | | | | | Add the __call__ operator. Fixes: PYSIDE-2767 Pick-to: 6.7 6.5 Change-Id: Ic73df2918fb8effaceeddbcb2c92f7ac7eb861c5 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Documentation: Update versions for Qt 6.8Friedemann Kleint2024-05-284-22/+34
| | | | | | Task-number: PYSIDE-2620 Change-Id: Iff5ac3c8281893adfa0ba3cbd64936fd7c4d6257 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix suppressed exceptions for 0-delay singleShotAdrian Herrmann2024-05-273-0/+40
| | | | | | | | | | | Fix an issue where exceptions were not shown when raised inside a slot called from a zero-delay singleshot timer, causing problems further down the line. Pick-to: 6.7 Fixes: PYSIDE-2745 Change-Id: Iab7696663e5dfa00d99d28ee21ac687fde4cf731 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* libpyside: Remove short circuit signal handlingFriedemann Kleint2024-05-275-42/+15
| | | | | | | | | | | There was a "Short circuit" code path triggering on QMetaMethod signal signatures without parentheses, which is apparently dead. Task-number: PYSIDE-2667 Change-Id: I68c4c636ea224a7691e76286ed43f5aaaa6d4bd7 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Qt Designer plugin: Fix a build issue observed in 6.5 with Python 3.10Friedemann Kleint2024-05-241-0/+3
| | | | | | | | | Add QT_NO_KEYWORDS to avoid clashes with variables named slots in CPython headers. Pick-to: 6.7 6.5 6.2 Change-Id: I64a63d816b24f8bd5b3b58375fab26ddc2f6c76a Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Fix type hint of QModelIndex.internalPointer()Friedemann Kleint2024-05-221-0/+2
| | | | | | | | | | | | It returns the item passed to createIndex(). Amends c8970b29d76415d41fa383cbe5eb77eefb191fa1. Pick-to: 6.7 Fixes: PYSIDE-2762 Task-number: PYSIDE-883 Change-Id: I0fd33b4958513db9355af9147033872ef335c07e Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Desktop Deployment: ignore .qsb, .webp, .cpp.o and .qen filesShyamnath Premnadh2024-05-211-0/+9
| | | | | | | | | | | | | | | - These files have to be ignored in the deployment process because Nuitka is not able to recognize these file formats and considers them to the dlls instead of data files. - The missing .webp files breaks the usage of BusyIndicator type of QtQuick Controls. Hence, a bug report for that is raised in Nuitka : https://github.com/Nuitka/Nuitka/issues/2854 - Adapt tests Pick-to: 6.7 6.5 Change-Id: Ic4b3b6c65e059ec618a26361caa62b9d7c608690 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
* PySide6: QNetworkAccessManager.setCache() takes ownership of cache objectPhilipp Wolfer2024-05-171-0/+5
| | | | | | | Fixes: PYSIDE-2759 Pick-to: 6.7 Change-Id: I0aa203a868ea37e07fc51ea892a11038bcc6faab Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add QAccessibleSelectionInterfaceMichael Weghorn2024-05-162-0/+2
| | | | | | | | | | | The interface was added as preliminary in qtbase commit 9d16d5e2245c26e5746fd7609300b84a2a983457 and is no longer preliminary since qtbase commit 2496882ea71b8bc52c84e1b9c59cfd48cd56c6f2. Pick-to: 6.7 Change-Id: I8a24aa2a7a1cd961bdc9974f41d407783ad1a82b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* pyi: fix QItemSelection.__init(self) returning wrong typeFrancisco Boni2024-05-161-2/+3
| | | | | | | | | QItemSelection as return-type attribute is unnecessary to make the function known to shiboken. And it was mistakenly setting it as the return type in the Python signature. Pick-to: 6.7 Fixes: PYSIDE-2756 Change-Id: I1f7a4355f483e968839dad34d0e9b9cee8fa06b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Python 3.12: Avoid issues with reference counting of immortal Python typesFriedemann Kleint2024-05-163-7/+7
| | | | | | | | | | Use the PY_RETURN_* macros for returning them. Pick-to: 6.7 6.5 Task-number: PYSIDE-2747 Change-Id: I48db8b958925e6ae39ce8ae8fb926429d0e4cd02 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Add missing QQuickWebEngineProfile.setUrlRequestInterceptor() and othersFriedemann Kleint2024-05-162-2/+12
| | | | | | | | | | | QtWebEngineQuick was missing the dependency to QtWebEngineCore and thus rejected the function due to missing class QWebEngineUrlRequestInterceptor. Fixes: PYSIDE-2758 Pick-to: 6.7 Change-Id: I334a9c6899b1093d27d39cdb57e84f4b5aed6d65 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix build for Tech Preview classesFriedemann Kleint2024-05-152-4/+4
| | | | | | | | | Header QSurfaceDataProxy no longer exists after qtgraphs/b023ef4ef5686656437be0795099de2be0ac216f . Pick-to: 6.7 Change-Id: Iaca9d85208ec22d19d5eb240f77cc83987146e49 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Speed up test bug_927.pyFriedemann Kleint2024-05-141-4/+4
| | | | | | | | Bring the execution time from 4s to ~200ms on a normal machine. Pick-to: 6.7 6.5 Change-Id: If57aa5a73089f48cba1b7bcf6789864d8dfbb48c Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Fix undesired invalidation of QObjects/QWidgets after calling parent(Widget)()Friedemann Kleint2024-05-142-6/+0
| | | | | | | | | Remove setting of parent relationship to the return values of QObjects.parent(), QWidget.parentWidget(). Fixes: PYSIDE-2711 Change-Id: Ib6fbcea4b1ecd0efa95d9e4c71dccc5cd0d365aa Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Documentation: Add more doc file hints for QML functionsFriedemann Kleint2024-05-131-3/+6
| | | | | | | | | Complements ad5eb64daaaa1b927bcbf9e568738f417fef845f. Pick-to: 6.7 Task-number: PYSIDE-1106 Change-Id: I0ae554db3be02d6160e7e00af46f21ff0a34cca8 Reviewed-by: Christian Tismer <tismer@stackless.com>
* QtAsyncio: Improve documentation (part 2)Adrian Herrmann2024-05-103-8/+43
| | | | | | | | | | Improve the inline documentation of QtAsyncio with more comprehensive comments. Pick-to: 6.7 Task-number: PYSIDE-769 Change-Id: I7306da43d8f1f350dae188f5346cdec8f60a7a06 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtAsyncio: Improve documentation (part 1)Adrian Herrmann2024-05-101-3/+110
| | | | | | | | | | Improve the inline documentation of QtAsyncio with more comprehensive comments. Pick-to: 6.7 Task-number: PYSIDE-769 Change-Id: I3828dea94f770a69e8d0390fd803b923ba932fc2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Shiboken: Simplify Python Error MessagesChristian Tismer2024-05-109-64/+34
| | | | | | | | | | | | | | | | | | | The function PyErr_SetString is used quite often, which has no return value. The bracketed sequence PyErr_SetString(...); return nullptr; can in most cases be replaced by a single call to return PyErr_Format(...); To simplify matters, PyErr_Format is now used everywhere. Task-number: PYSIDE-2404 Change-Id: I5988fcd2430be700415d14d7a5cc740211e61d08 Pick-to: 6.7 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Fix type hint of QTranslator.translate()Friedemann Kleint2024-05-101-0/+5
| | | | | | | | | The function takes strings like the other translate() functions. Pick-to: 6.7 6.5 Fixes: PYSIDE-2748 Change-Id: I331ba045276192c6f83ddae3f1a24459a9570bfa Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Generate polymorphic bases into type discovery functionsFriedemann Kleint2024-05-063-4/+4
| | | | | | | | | In case of a chain QLabel->QWidget->QObject; QWidget should be marked as a polymorphic base and checked for example for functions returning a QWidget *. Change-Id: I44306d6635794119e6f18658a438e64160c5c41c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>