aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix QCanDbcFileParser parse function overloadsEce Cinucen2025-02-205-1/+60
| | | | | | | | | | | Add the overload-number attribute to parse function to execute first QString check and then QStringList. Test for parser added. Fixes: PYSIDE-3017 Pick-to: 6.8 Change-Id: I7e5a02fec50405bc3d71c5662a7909d34f4d20df Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* type hints: Make the error messages more verboseChristian Tismer2025-02-201-1/+1
| | | | | | | | | | | | | The --pretty switch shows a little context. If that does not help, we will have to send the whole PYI file back from CI. Task-number: PYSIDE-2846 Task-number: PYSIDE-3012 Change-Id: I45a4111c6ea78bf6c487077c43eb37b946602ec8 Pick-to: 6.8 Reviewed-by: Ece Cinucen <ece.cinucen@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Change some templates to be snippetsFriedemann Kleint2025-02-207-117/+100
| | | | | | | | Brush up the code and remove unused templates. Pick-to: 6.8 Change-Id: Ic9a0a6fb941e0d110124df7f02b2fc3c91664656 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Enable code snippets for templatesFriedemann Kleint2025-02-206-138/+158
| | | | | | | | | | | Prototypically move some template code from QtGui into snippets. [ChangeLog][shiboken6] It is now possible to use file snippets for XML template content. Change-Id: Ifb23407819c843e9059225a5bd269d954f837ee3 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix disconnecting a string-based connection by passing a callableFriedemann Kleint2025-02-202-10/+69
| | | | | | | | | | | | Amends cab304e70cce68bbdaa70d7f7b2bf6e95e85e6d2. Restructure the test. Pick-to: 6.8 Fixes: PYSIDE-3020 Task-number: PYSIDE-1057 Change-Id: I8954a534648ded5d476fec608d0699132a026461 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libshiboken: Rename AutoArrayPointer to ArrayPointerFriedemann Kleint2025-02-203-4/+4
| | | | | | | | | | | The old name was modeled after std::auto_ptr, which has been deprecated for quite a while. [ChangeLog][shiboken6] Helper class AutoArrayPointer has been renamed to ArrayPointer. A convenience typedef is provided. Change-Id: I067b22a102961348067a131fcc6e6b5fc42d3f76 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Remove some unused templatesFriedemann Kleint2025-02-203-59/+0
| | | | | | Pick-to: 6.8 Change-Id: I9530a1b3f2b315a91fbc8d0885a46640c73c4f2a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QtWidgets: Use the new sequence templatesFriedemann Kleint2025-02-202-19/+8
| | | | | | | | | Use templates introduced by e3631c3322d28447068de3a874055ff937b237c4. Pick-to: 6.8 Task-number: PYSIDE-3002 Change-Id: I5b7948c83768fa0c03c6b360717d202270ebbc9e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Fix the type of the "result" parameter of the native event filtersFriedemann Kleint2025-02-201-4/+4
| | | | | | | | | | It has been widened to qintptr in Qt 6 (qtbase/3b38c)3c7ffa71c00c172cf0e05742835a304300). Pick-to: 6.8 6.5 Task-number: QTBUG-72968 Change-Id: I17846607108b29527415c97bbaabe2acecf9bac0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Remove XML template typesystem file opengl_common.xmlFriedemann Kleint2025-02-205-40/+3
| | | | | | | | | Use the existing code snippet for glGetString. callArrayFunction appears to be unused. Pick-to: 6.8 Change-Id: I7eeff9866bc7b4eb6e0f9bb409ae0382723c96c4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Silence some shiboken warnings about internal QtQml/QtQuick typesFriedemann Kleint2025-02-192-0/+2
| | | | | | | Pick-to: 6.8 Task-number: PYSIDE-3011 Change-Id: I92fde30427d6fc8572f1d65e267809c1255b0d31 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix overriding QPaintEngine virtual functions taking a C-style array of ↵Friedemann Kleint2025-02-194-10/+296
| | | | | | | | | | | | | | | | | | geometry primitives Add argument conversions PySequence<->C-style array, modelled after QGraphicsView::drawItems(). Move some templates around to the common template file and add generic conversions for lists of value types. [ChangeLog][PySide6] The virtual functions of QPaintEngine taking a C-style array of geometry primitives have been fixed. Fixes: PYSIDE-3002 Pick-to: 6.8 Change-Id: Ife8fed0e17c79091f25f57bf97bcca438452e177 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* binary size: Improve the benchmark toolChristian Tismer2025-02-171-18/+29
| | | | | | | | | | | | | | | | | | The benchmark tool now uses per default the limited API but is becoming more flexible. This will take some more checkins until it comes to convergence. The starting point stays 2025-01-27 right before a substantial change which is otherwise not measurable. The switchable size reductions will slowly vanish. The difference approach makes then no longer sense, and the --absolute switch will become the default and vanish. Task-number: PYSIDE-2701 Change-Id: I990ef26860924c10784a70ec74a2a318b4be7d41 Pick-to: 6.8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide6: Add QFont.Tag(str), QFont.Tag.fromString(), QFont.Tag.fromValue()Friedemann Kleint2025-02-133-1/+61
| | | | | | | | | | The constructor is a non-type template that checks the string length. Add a function for it. Pick-to: 6.8 Fixes: PYSIDE-3013 Change-Id: I35626c29edddf38c04c5b913a35b36c540c45d6a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix the SQL tutorial to workFriedemann Kleint2025-02-134-8/+235
| | | | | | | Adapt to qtbase/d49a7412f55390e461773f4ffc36a82958d59b6d. Change-Id: I45065fd96a055f7966268ca14fd517f23798a923 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Fix flake8 warnings in tutorialsFriedemann Kleint2025-02-1317-56/+55
| | | | | | | Pick-to: 6.8 Change-Id: I90fe3e854af90618cc2e450a473110306d651b4f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Ece Cinucen <ece.cinucen@qt.io>
* Fix QAbstractSpinBox.fixup() behaviorFriedemann Kleint2025-02-111-0/+3
| | | | | | | | | | | Add the missing native return value conversion. Complements 6c0a0d70305cd6e12260a352099e74d34f3c239e. Pick-to: 6.8 Fixes: PYSIDE-3014 Task-number: PYSIDE-106 Change-Id: I7cce422512175dcbf15ca0e9c0a0a3be5dfb93d6 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix crash of signals with object-type parameter being passed by const-refFriedemann Kleint2025-02-114-3/+29
| | | | | | | | | Add a further indirection in callPythonMetaMethodHelper() when only a pointer conversion is available for a const-ref parameter. Task-number: PYSIDE-3004 Change-Id: I6ec7c5a9d4d30c8e4973ec79534d5f3eb3bf8204 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Build system: Adapt to 2 digit minor version numbersFriedemann Kleint2025-02-111-2/+2
| | | | | | | | | Use string literals instead of str(version), which causes 6.10 to be returned as "6.1". Task-number: PYSIDE-3011 Change-Id: I2c5a295c6f283d1efb92dabcb05c3baed8b20b9e Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* binary size: Update the benchmark tool to absolute measurementChristian Tismer2025-02-071-9/+26
| | | | | | | | | | | | | | | | | | After sizebench.py was used successfully on relative changes (with a disable switch in the code), we now add an absolute mode. This way, we can stop to support switching. The starting point is 2025-01-27 right before a substantial change which is otherwise not measurable. The new mode is activated with --absolute / -a It works much faster since it compares against a constant. Task-number: PYSIDE-2701 Change-Id: I341a23722a304473e92f8ef38c6d16b3b69a8a92 Pick-to: 6.8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken6: Consider all base classes when finding a modificationFriedemann Kleint2025-02-061-50/+0
| | | | | | | | | | | | | | | | | | This enables removing a duplicate modification for QGraphicsWidget::getContentsMargins() which is inherited from class QGraphicsLayout, QGraphicsLayoutItem (2nd base class) and activates other base modifications for QGraphicsObject-derived classes. Also add a flag indicating whether the modification is inherited from a base class or directly specified for later use in size reduction. [ChangeLog][shiboken6] Modifications from base classes in multiple inheritance will now be correctly applied. Task-number: PYSIDE-2701 Change-Id: I190764a673fb6b7ad44aea5ed90ff64c57eda324 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Adapt to 6.9Friedemann Kleint2025-02-0614-4/+37
| | | | | | Fixes: PYSIDE-2862 Change-Id: I7cef186d1fb1e1b23cb62daa659db6fab2f460d9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libpyside: Fix some clang-tidy warningsFriedemann Kleint2025-02-036-11/+9
| | | | | | | | - Remove superfluous casts Pick-to: 6.8 Change-Id: I8dd7cdd1e9d3f30103fc6d87bf04d7f0d0182603 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Documentation: Various fixesFriedemann Kleint2025-02-031-0/+1
| | | | | | | | | - Fix spelling and a misplaced anchor - Add note about enumerations Pick-to: 6.8 Change-Id: Iafb8eaff6140381aeaa705c0d164b72708a00154 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* build system: Explicitly find private modules in librariesFriedemann Kleint2025-01-272-0/+4
| | | | | | | | | | In preparation for a change that might remove the automatic finding of private modules. Task-number: PYSIDE-2862 Task-number: QTBUG-87776 Change-Id: I22f872d341b20a3f39aa722ee83c2a7993661710 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Change binding for QSignalSpy to Py_DECREF wrapped typeBrett Stottlemyer2025-01-251-0/+6
| | | | | | | | | | | | This is arguably a bug, but would only be noticed in testing. It was preventing proper garbage collection in tests using QSignalSpy. I can see an argument it should keep the target object alive while running, but I don't see a good way to DECREF on close, so not holding a reference seems like the best option. Change-Id: I730d8b0a6efd3fef63dfd224917c2e5927d144c4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* pyside6-deploy: 5. Add Design Studio project example and testsJaime Resano2025-01-2315-0/+361
| | | | | | | | | | - Add an example of a mock Design Studio project - Add tests for pyside6-project CLI tool Task-number: PYSIDE-1612 Pick-to: 6.8 Change-Id: Ida3e469a4d2dab2fa4d8a2e473242faf1716b075 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Remove OpenGL as dependency for QtGraphsWidgetsCristián Maureira-Fredes2025-01-221-3/+7
| | | | | | | Fixes: PYSIDE-2988 Pick-to: 6.8 Change-Id: I29f5fcbcafdf240a8cb6f91f6c4b8d7fce47ec72 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* pyside6-deploy: 2. Improve deployment of Design Studio projectsJaime Resano2025-01-221-10/+10
| | | | | | | | | | | | Design Studio projects will specify the resources employed by the project in the .qrc file. This way, the deployment process is way simpler since all the file dependencies are stored compiled in a .py file. Task-number: PYSIDE-1612 Change-Id: Icc0047e9f9c183a4db51052a84743e5b095ec76a Pick-to: 6.8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* pyside6-deploy: 1. Minor refactoringJaime Resano2025-01-211-1/+2
| | | | | | | | | | Just adding some type hints and a bit of code cleanup None of the existing logic should be affected by this change. Task-number: PYSIDE-1612 Pick-to: 6.8 Change-Id: I42175426a03dc463b8da82aa560c3f13ab842392 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Documentation: Fix installation steps in `Building from Source`Shyamnath Premnadh2025-01-203-29/+56
| | | | | | | | | | | - Uses `create_wheels.py` instead of `setup.py install` - Additionally, fix some spelling mistakes. Pick-to: 6.8 Change-Id: I79ccdc940295dc48650742af57f3abc1b3e2fd2b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Ece Cinucen <ece.cinucen@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6/documentation: Add emphasis for doc injectionFriedemann Kleint2025-01-203-4/+4
| | | | | | | | | | Add a custom admonition for modified functions to highlight Python-specific aspects. Pick-to: 6.8 Task-number: PYSIDE-1106 Change-Id: I3fd32151b0786b6225970a7a05df56953d999fb1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Tutorial: Deploy PySide6 Applications to Boot to QtShyamnath Premnadh2025-01-143-0/+185
| | | | | | | | | | - The tutorial explains how to deploy PySide6 applications to Boot to Qt OS on Raspberry Pi. Pick-to: 6.8 Change-Id: I0764c13ddc2ad47084821048e734c70ed6263b0c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
* Documentation: Add `uv` to the building instructions for PySide6Shyamnath Premnadh2025-01-083-0/+66
| | | | | | | | | | - Add `uv` to the building instructions for PySide6, to make it easier for users to build PySide6. Pick-to: 6.8 Change-Id: I95708b5f8049ddc1f94ff7dd9d9a8b1cca4d2ce3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add missing binding for QPdfOutputIntentEce Cinucen2025-01-062-0/+2
| | | | | | | Pick-to: 6.8 Task-number: PYSIDE-487 Change-Id: I8aea7a1e0e6a11a44728c7c4a402576d27ad4790 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Android Deployment: Auto download Android NDKShyamnath Premnadh2025-01-021-4/+46
| | | | | | | | | | | | | | | | | | | | | | | | - In order to prevent code duplication, a symlink to tools/cross_compile_android/android_utilities.py is created under sources/pyside-tools/deploy_lib/android. When running the script sources/pyside-tools/android_deploy.py, this works without any issues. When packaging the tools, the symlink is resolved into the actual file and the actual file is packaged into the wheels. - Remove global variable to __init__.py and remove the ones that are not used - Add tqdm to requirements.txt - Adapt tests - Additionally, include several new test cases to cover error scenarios more comprehensively Pick-to: 6.8 Task-number: PYSIDE-1612 Change-Id: I74728be30a2b8214b9a379b0b906fdacbb105833 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide6/Tests: Use fully qualified enumerationsFriedemann Kleint2024-12-20113-403/+440
| | | | | | | | | As a drive-by fix flake errors. Pick-to: 6.8 Task-number: PYSIDE-1735 Change-Id: I9829b011fee78fc8edd1aefdd3066ae89e63644b Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* qpixmap_test.py: Fix warning about leaking file handleFriedemann Kleint2024-12-201-2/+8
| | | | | | | | | | | | | Port to pathlib, fixing: sources/pyside6/tests/QtGui/qpixmap_test.py:42: ResourceWarning: unclosed file <_io.BufferedReader name='/data0/frkleint/pyside-setup6i/sources/pyside6/tests/QtGui/sample.png'> data = open(os.path.join(os.path.dirname(__file__), 'sample.png'), 'rb').read() ResourceWarning: Enable tracemalloc to get the object allocation traceback Pick-to: 6.8 Change-Id: I8417719eb150aae9e04b5ff706e3934b398e7381 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* sizebench: adapt classifiers on testCristián Maureira-Fredes2024-12-181-2/+2
| | | | | | | | | | the python classifiers were removed in c5880ced5b6cfc7a07af9d4e7079af563ceae089 so the test will fail. Change-Id: I58033f387bcebed76ca8b1bba18cc991975338d1 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Remove unnecessary use of 'object' in class constructionremoteobjectsdevCristián Maureira-Fredes2024-12-1819-25/+27
| | | | | | | | | | | Considering we are not compatible with Python 2 anymore, we can drop the 'object' explicit inheritance in the class declaration. Pick-to: 6.8 Change-Id: Iac3a95aa9721c3ff1a755f457c0936ca157a8470 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix some flake8 errors in tests/examplesFriedemann Kleint2024-12-1732-56/+52
| | | | | | | | As unearthed by the whitespace change. Pick-to: 6.8 Change-Id: I58c1a38c3c4a9c91719131d7950950ddf475872b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Documentation: Add missing pagesFriedemann Kleint2024-12-172-2/+105
| | | | | | | | | | | | Add pages referenced from the overviews-main page and various module pages. Do a scan and add all (non-class reference) documents found except qtcore/qtdoc (too many) and deprecated modules. As a drive-by, developer the documentation. Pick-to: 6.8 Change-Id: Ibe16ff70b627274fbbbffeb93030ddea230295a8 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PySide: Add WebView for macOSShyamnath Premnadh2024-12-174-4/+41
| | | | | | | | | - caused by wrong condition check in 83603fed574fc7b0eed452b347170862b12a98f6 Pick-to: 6.8 Fixes: PYSIDE-2964 Change-Id: I1b5c441cd7448898e44f8d829b91202e68168666 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Documentation: Fix broken link of the Qt overviews from the Tutorials pageFriedemann Kleint2024-12-171-1/+1
| | | | | | | | | Fix the link to the qtdoc-overviews-main.rst page introduced by 5cd44e96cee2e8fc105372b5234b0682a7bcc012. Pick-to: 6.8 Change-Id: I8d48687e9703b2df52d41ca5607a9e81491910bc Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpyside/ PySideSignal: Fix a memory leak connecting to signalsFriedemann Kleint2024-12-165-135/+157
| | | | | | | | | | | | | | | | | | | | | | | 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>
* libpyside/ PySideSignal: Reduce number of weakref handlers for sender trackingFriedemann Kleint2024-12-163-31/+58
| | | | | | | | | | | | | | Introduce a struct shared by shared_ptr in all instances of PySideSignalInstancePrivate that is tracked by the weak reference. Amends db40e3e07932576bc54cd922eecd423c0f675613 Task-number: PYSIDE-2201 Task-number: PYSIDE-79 Pick-to: 6.8 Change-Id: Ic7bb836422f3843a02474f2bb92641b8a9ebc824 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* doc: use footer instead of body for hover textCristián Maureira-Fredes2024-12-161-2/+2
| | | | | | | Pick-to: 6.8 Change-Id: Ia185a68fe276c9b83bd47fdb2b964d22bee5e382 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Documentation: Fix some warningsFriedemann Kleint2024-12-162-3/+3
| | | | | | Pick-to: 6.8 Change-Id: I8d370d76264884924136879238a5bffef489c19e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Documentation: Update QtQml/QtQuick modulesFriedemann Kleint2024-12-133-58/+100
| | | | | | | Task-number: PYSIDE-1106 Pick-to: 6.8 Change-Id: If09bf185c5fa23c2866bab23c7bd9570828000c1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6/Documentation: Prominently display QML typesFriedemann Kleint2024-12-1310-19/+1
| | | | | | | | | | | | | | | | | | | Previously the link to the QML types list (Qt web documentation) was automatically inserted into the last paragraph of the module description. This only had an effect when no PySide module description was present. Otherwise, it had to be manually added to the module description which was overlooked for some modules. To fix this, extend the module documentation obtained from the doc parsers by the URL to page and format it as a separate section preceding the class list. Remove the QML types from the PySide module descriptions. Pick-to: 6.8 Task-number: PYSIDE-1106 Change-Id: I0b107a81b239405c0258ecff924aef87472f13b0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>