aboutsummaryrefslogtreecommitdiffstats
path: root/sources
Commit message (Collapse)AuthorAgeFilesLines
* Shiboken: use the Python 3.11 buffer interface for Limited APIChristian Tismer2022-07-193-7/+7
| | | | | | | | | | | | | | | | | | | | Because the stable API includes now the bufferprocs, we add a warning to remove the special handling when the lowest version is 3.11 . Unfortunately, I see no other way to use the new buffer interface, because things must work with every Python runtime. But that also does no harm, since this is now in the stable API. And of course, we can remove the boring version check :) Also, an old shiboken error workaround could be removed. XXX No, the shiboken error still exists in RHEL Change-Id: I2fae8cabb2cf116a7365b9cf45618da5238c2ea7 Pick-to: 6.3 Task-number: PYSIDE-1960 Reviewed-by: Christian Tismer <tismer@stackless.com>
* PyEnum: Increase compatibility by allowing defaults etc., refinementChristian Tismer2022-07-193-20/+38
| | | | | | | | | | | | | | | | | | The change has been tested with Python 3.6 to 3.11.0b4 . The enum_310.py warning triggers now only when on 3.11.0 final. The enumFlagInfo empty check was simplified by removing empty structures. The code introspection was optimized version-specific for Python 3.9 and Python 3.11 where optimizations were introduced. Task-number: PYSIDE-1735 Change-Id: Ic5e25fd4edae0ab92aad291a8067c9dcccd5acb8 Pick-to: 6.3 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PyEnum: Simplify the test-cases with the new forgiveness modeChristian Tismer2022-07-147-55/+34
| | | | | | | | | | | | | | | | | | | | | | With the new forgiveness, all the "normal" uses of old enums are working with the new enums, too. What does not work are range violations and inheritance of enums from other enums. Also, the implemented trick does not work for enums which do not belong to a class. The induced bugs are easy to find, because they should normally break at import time. [ChangeLog][PySide6] The new forgiveness mode of Python enums allows to use old enum code, most of the time. Much changed test code was reverted. Change-Id: I9c081831309f1b2358fe86e6107b0f4d78fd48cf 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>
* PyEnum: Increase compatibility by allowing defaults and old flag namesChristian Tismer2022-07-147-8/+339
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch supports to write Qt.Alignment() instead of Qt.AlignmentFlag(0) Also supported is Qt.AlignmentFlag() which is mapped to Qt.AlignmentFlag(0) This trickery was quite involved since the Python opcodes needed to be analyzed if we have a parameterless call. Only in that case, we insert a partial object which supplies the missing value=0 default. Changing the implementation of PyEnum was not desired because this is highly complicated, not portable and even not possible. The change has been tested with Python 3.6 to 3.11.0b3 . [ChangeLog][shiboken6] The new Python enums are made as compatible to the old ones as possible. It is again allowed to use Qt.Alignment() instead of Qt.AlignmentFlag(0), and a default of 0 is always allowed. Change-Id: If6a93f8210ff6cae4e38251420e1ad5fffbe42cb Pick-to: 6.3 Task-number: PYSIDE-1735 Reviewed-by: Christian Tismer <tismer@stackless.com>
* PyEnum: make forgiving duplicates work with Python 3.11Christian Tismer2022-07-144-13/+20
| | | | | | | | | | | | | | | | | | | There was a silent change in PyEnums that turns Enum attributes into properties. This does not harm the Python interface but needed some change in the duplication emulation. Furthermore, new internal enums are created with an underscore name. The meta class was changed from EnumMeta to EnumType. [ChangeLog][shiboken6] The new Python Enums are now compatible with Python 3.11 Change-Id: I3b1ab63dc5eed15a75ebd0f42dddf4001f640c00 Pick-to: 6.3 Task-number: PYSIDE-1735 Fixes: PYSIDE-1960 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Shiboken: Fix the oldest shiboken bug ever which shows up on Python 3.11Christian Tismer2022-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | b7df2f1c0 "Fix signal initializer.", 18. May 2010 at 00:55 There was a `PySequence_Check` in the evaluation of some signature function parameter processing, which should have been `PyTuple_Check`. Since the new PyEnums are also sequences, the new optimization in Python 3.11 changed the parameter handling in a correct way and replaced the argument tuple by a direct single argument of an enum type. And that is also a sequence ... There are probably still dormant issues like this in the codebase which gives reason to submit a task that checks all Python interface functions for correctness. Change-Id: I45996a0458c3e60795d2eb802eb98f7dd3678d92 Pick-to: 6.3 Task-number: PYSIDE-1735 Task-number: PYSIDE-1987 Fixes: PYSIDE-1988 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* doc: add package detail pageCristián Maureira-Fredes2022-07-084-4/+151
| | | | | | | | | | | | To clarify the content of the packages, dependencies, and tools that we include in the wheels. Other files were modified to link the new page. Pick-to: 6.3 Task-number: PYSIDE-1112 Change-Id: I358c47601e2b930b12807dda41382474186baf01 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix Documentation - Cross CompilationShyamnath Premnadh2022-07-071-0/+5
| | | | | | | | | | | | | | - Fix symlinks appears as if it were only a part of Option B of prerequisities. This is now fixed by adding a new sub-heading. - Added a note about having same version for host and target Qt. Having 6.3.0 on the host and 6.3.1 on the target, does not work for cross compilation. The documentation mentions same minor version works for cross compilation. However, this works for 6.2.4 on host and 6.2.1 on target. Hence, not completely removing the statement. Pick-to: 6.3 Change-Id: Ic678dbf094998108c55d916074753db41e9a2e0f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Shiboken: Rewrite the signature initializationChristian Tismer2022-07-0711-104/+68
| | | | | | | | | | | | | | | [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>
* Shiboken: Move the shibokensupport initialization into the moduleChristian Tismer2022-07-075-31/+16
| | | | | | | | | | | | | | | Importing shibokensupport is now possible inside the Shiboken import. That is a prerequisite to re-order the signature initialization, which is again mandatory for the new PyEnum forgiveness feature. This allows to remove much initialization code and makes the Shiboken startup less vulnerable. Task-number: PYSIDE-1735 Change-Id: Iaed4275d7e204fb242b1466cd6d2c09ad10002b5 Pick-to: 6.3 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix getting started Qt for PythonShyamnath Premnadh2022-07-073-3/+12
| | | | | | | | - the pip install -r requirements.txt command should come after pyside-setup is cloned Pick-to: 6.2 6.3 Change-Id: I4ed8108bf1fb850f773d422472b603ee11d97b87 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix Typo : PySide Debugging TutorialShyamnath Premnadh2022-07-071-1/+1
| | | | | | | | - CMAKE_BUILD_TYPE instead of MCAKE_BUILD_TYPE Pick-to: 6.2 6.3 Change-Id: I542d3828c6b2dad3fa5f48dbedfecf37910fcae8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix signal ↵Friedemann Kleint2022-07-061-0/+7
| | | | | | | | | | | QAbstractItemModel::layoutAboutToBeChanged(QList<QPersistentModelIndex>) Add a meta type registration for QList<QPersistentModelIndex>. Pick-to: 6.3 Task-number: PYSIDE-1978 Change-Id: I579926877c69a624dc709b3c0534a963b04f6901 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix compilation of unique pointer converters for derived classesFriedemann Kleint2022-07-016-3/+37
| | | | | | | | | | | Add a std::move() to the converter. Also add a test, which currently still fails. The pointer needs to be moved back after the call. Task-number: PYSIDE-454 Change-Id: I173d1becdbac53739923ddbce8a8cdc4f203ccea Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Simplify smart pointer types when searching instantiationsFriedemann Kleint2022-07-011-8/+12
| | | | | | | | | | | | When the code model first sees a "foo(const SmartPtr &)" instead of "foo(SmartPtr)", compilation would break since const, & propagate into the generated type name. Simplify types as is done for containers as well. Task-number: PYSIDE-454 Pick-to: 6.3 6.2 Change-Id: I1d9f75aceb983f8e9c4a28314db94b8d83b1c1ca Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add dependency to the QtHttpServer moduleFriedemann Kleint2022-07-011-1/+2
| | | | | | | | | | | Amends 7eb12e4cd3be60b4aaf18530d0c927bef386e913. Exclude it for Windows currently due to a clash with winnt.h defining a DELETE macro. Change-Id: I47f2dea77991e74e00cd8fdc3de6ef5f850d4386 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Remove left-over archive fileFriedemann Kleint2022-06-301-0/+0
| | | | | | | | Added by 25180730194bec25f915f32ab846ea583fb1493f. Pick-to: 6.3 6.2 Change-Id: Ib6440293f5193972cb5f10c71816b6e7189534a9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libpyside: Add debug operators for some signal structuresFriedemann Kleint2022-06-301-0/+41
| | | | | | Task-number: PYSIDE-1978 Change-Id: I84118a41df3569329093d7f216f8dc148fe1ba2f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libpyside: Improve error message about using the wrong signal overloadFriedemann Kleint2022-06-301-6/+13
| | | | | | | Pick-to: 6.3 Task-number: PYSIDE-1978 Change-Id: I912d4317bc639c5c597ab8259eef4ae389af04e6 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add initial support for std::unique_ptr pointerFriedemann Kleint2022-06-3018-16/+335
| | | | | | | | | | | | | | Known limitations: - No rich comparison is generated - Value conversions caused by passing pointers to derived classes do not work. [ChangeLog][shiboken6] Support for std::unique_ptr pointer has been added. Task-number: PYSIDE-454 Change-Id: I5ddf3156bb383598f91bb97d169d1e134918a161 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Add tests for shared pointer virtual callsFriedemann Kleint2022-06-295-1/+50
| | | | | | Task-number: PYSIDE-454 Change-Id: I9571b0df985a0823641d10c6455eafbc2fc0ac94 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Refactor argument conversion for virtual method overridesFriedemann Kleint2022-06-294-91/+53
| | | | | | | | | | | | | | | | | | | | | | Virtual method overrides use Py_BuildValue() to create the argument tuple for the call with its built-in conversions. Fold the code for creating the argument and its format string into a new helper CppGenerator::virtualMethodNativeArg(). Remove ShibokenGenerator::getFormatUnitString(). Change the logic to check for conversion rules from modifications and convertable primitives first and fall back to shiboken conversions for the rest, removing the complicated condition duplicated in ShibokenGenerator::getFormatUnitString() and CppGenerator::writeVirtualMethodNativeArgs(). This fixes a bug where no conversion was created when passing smart pointer by values in a virtual functions. Task-number: PYSIDE-454 Change-Id: I20ef047c89a0d0047f5234a90aae548ca8e6b932 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Introduce a convenience function for argument conversion rulesFriedemann Kleint2022-06-294-16/+20
| | | | | | | | This simplifies the code. Task-number: PYSIDE-454 Change-Id: I725d407508315eca20ff93383d0f689d512a20d5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* doc: Fix line numbers in the porting tutorialFriedemann Kleint2022-06-291-3/+3
| | | | | | | | | | Fix warning: sources/pyside6/doc/tutorials/portingguide/chapter1/chapter1.rst.rst:51: WARNING: line number spec is out of range(1-113): '44-122' Amends 99d76b5e4e2397fcb4ddf45de91748ab1861f755. Change-Id: Ic2d30b4b6431bef7406763a27f124fccf30b6f7e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Build with lean Qt headersFriedemann Kleint2022-06-295-2/+10
| | | | | | | | | This should speed up compilation time. Task-number: QTBUG-97601 Change-Id: Ibd25739dfe5032113ff9c1df5ff5da4cf9effc2d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add QtSpatialAudioFriedemann Kleint2022-06-294-0/+74
| | | | | | | | Adapt to qtmultimedia/c403e775f60a5d02e761904342ac243be1f22597. Change-Id: Id078b2a7ca46ff775fbbc543428a3208d5410981 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Adapt to Qt 6.4Friedemann Kleint2022-06-2910-8/+25
| | | | | | Change-Id: I46f6291c1c363b1e509ef458e635f97f4423f81b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Split the writing of virtual method arguments into separate functionFriedemann Kleint2022-06-272-59/+63
| | | | | | | Change-Id: Ieb42bd4b7f4c60abc011129ffe07da242cfeeba0 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* shiboken6: Fix mapping of arguments when writing virtual methodsFriedemann Kleint2022-06-275-9/+38
| | | | | | | | | | When generating the code for virtual methods, removed argument were not properly taken into account. Add a mapping method for this to AbstractMetaFunction. Change-Id: I6caf6bd676256affa7c9b85b36bec74a1c642be2 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* libshiboken: Remove old code paths for static stringsFriedemann Kleint2022-06-271-59/+0
| | | | | | | | | | PyUnicode_InternFromString() should be used unconditionally. Amends a09a1db8391243e6bb290ee66bb6e3afbb114c61. Task-number: PYSIDE-1960 Pick-to: 6.3 6.2 Change-Id: I80837b2b58c9eadbd2aca4279df10e2f03e30450 Reviewed-by: Christian Tismer <tismer@stackless.com>
* libshiboken: Fix crashes with static strings in Python 3.11Friedemann Kleint2022-06-241-2/+17
| | | | | | | | | | | | In Python 3.11, some strings come with a refcount above decimal 1000000000, apparently indicating that they are interned. Replace the mechanism by PyUnicode_InternFromString(). Task-number: PYSIDE-1960 Pick-to: 6.3 6.2 5.15 Change-Id: I6436afee351f89da5814b5d6bc76970b1b508168 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix returning flags from QAbstractTableModel and other modelsFriedemann Kleint2022-06-241-3/+2
| | | | | | | | | | | | | | Move the function modification from QAbstractListModel to QAbstractItemModel. Amends 20eb4f94c637d20461f1fef16942841803ada909. Pick-to: 6.3 Fixes: PYSIDE-1974 Task-number: PYSIDE-1930 Change-Id: I9adedf8340a7f0999c42147e8fd290444642abcc Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* support enum handling for headerData(...)Shyamnath Premnadh2022-06-241-0/+4
| | | | | | | | | - similar to data(...), headerData(...) also needs to support handling of enums Pick-to: 6.3 Task-number: PYSIDE-1974 Change-Id: I7fd96e267af4cd30269e5fb42102c1bf6f32b155 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove build warning qCDebug, qCWarning, qCInfo, qCCriticalShyamnath Premnadh2022-06-231-4/+4
| | | | | | | | | | | | | | | | amends 936bdcf97f8ca657531496592dfce7d9144fa977 Warning (potential error) fixed - ../PySide6/QtCore/PySide6/QtCore/qtcore_module_wrapper.cpp:947:35: warning: format string is not a string literal (potentially insecure) [-Wformat-security] qCCritical(*category, cppArg1); Pick-to: 6.3 Task-number: PYSIDE-1899 Change-Id: If488e7b0d44cb905549fc35855439dec2194a79b Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix build with QT_LEAN_HEADERSFriedemann Kleint2022-06-231-0/+2
| | | | | | | | | Amends f88b4b646776b4d6fc8c9ab5253a0a4f89e26976. Pick-to: 6.2 6.3 Task-number: QTBUG-97601 Change-Id: I3cd27556dc975d72a3dfebb8fb16d21edf00767b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libshiboken: Fix build with numpy 1.23.0Friedemann Kleint2022-06-231-0/+5
| | | | | | Pick-to: 6.3 6.2 5.15 Change-Id: I885c332d6c948820140946c73ae1926e88834143 Reviewed-by: Christian Tismer <tismer@stackless.com>
* docs: adapt snippets to new license rowsCristián Maureira-Fredes2022-06-2215-75/+75
| | | | | | | | | | The license headers are now a couple of lines compared to the previous 40 lines, so the snippets that select 'from which line' the code must be included needed some adaptation. Change-Id: Id8bb87d708cc7c9edadb1b8265cecf81bf0bf5ae Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix documentation generation for 6.4Friedemann Kleint2022-06-222-3/+3
| | | | | | | | | | Adapt to moved docconf files (qtspeech/07ce95a6094ced5c2a718255d663a6c67d0f26b7, qttools/6af882fa2f45f73ec2ba4066d5ae3ad072d0c5ee). Task-number: QTBUG-95236 Change-Id: I9bf0605822037a88088db81673ad42e5c848acef Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6/Doc generator: Fix index pagesFriedemann Kleint2022-06-221-2/+2
| | | | | | | | | | | Insert a new line before "List of Classes", fixing: QtCore/index.rst 251 WARNING: Block quote ends without a blank line; unexpected unindent. Amends 530cfb8c9fb3a050635577afa5ae23145a3ecc30. Pick-to: 6.3 Change-Id: I15f55d224afa8c189d49cdd406d7c9f64ad9d82b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add QHttpServer::route()/afterRequest()Friedemann Kleint2022-06-222-1/+65
| | | | | | | | | | Complements 77e0363f0257caff13e8fe5fbb9cd1e7f948b066. Add the After Request example. Change-Id: I2d2bcd5993933e9ca133e2f451580633130ae5dc Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Implement the spaceship comparison operator of C++ 20Friedemann Kleint2022-06-2113-6/+137
| | | | | | | | Synthesize all comparison operators if one is found in the code model. Task-number: QTBUG-103757 Change-Id: I78fbcd93bc4cd172266f9dd0dbb2ebcf3a8bb7f2 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Do not consider move constructors for tp_initFriedemann Kleint2022-06-211-1/+3
| | | | | | | | | | Manifests in class QHttpServerResponder of the new QHttpServer module. Pick-to: 6.3 6.2 Change-Id: I6242f00aadefe60eb6ae9cde4a4f2c2bfa643a20 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* PyEnum: Remove the old duplication of Enums in the enclosing scopeChristian Tismer2022-06-218-19/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When implementing Python enums, the behavior of old Qt enums was copied: Every enum was also inserted into the enclosing scope. This patch removes that for two reasons: - it is inconsequent to keep an old quirk when we have all enums renewed so much - It is more consistent compared to our competitor - it is a prerequisite to implement efficient lazy initialization PROBLEM: Many constants (about 110) are no longer recognized, for instance `Qt.AlignLeft` should be `Qt.AlignmentFlag.AlignLeft`. The question is if that can be fixed easily in C++, or if the file mapping.py should get ~100 new fixes? SOLUTION: We allow the old enums, but tell nobody that they continue to work. They also are not advertized in the PYI files. [ChangeLog][PySide6] The duplication of enum values into the enclosing scope, allowing to write Qt.AlignLeft instead of Qt.Alignment.AlignLeft, is still implemented but no longer advertized in PYI files or line completion. Task-number: PYSIDE-1735 Change-Id: I79a90d08f2a5a3a069fa551e60d609ecad718239 Pick-to: 6.3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add the QHttpServer classesFriedemann Kleint2022-06-214-0/+67
| | | | | Change-Id: I9b58e806019ee7294da466a5fce1f1b7ed01c8a3 Reviewed-by: Christian Tismer <tismer@stackless.com>
* fix if else in qabstractitemmodel_dataShyamnath Premnadh2022-06-201-3/+1
| | | | | | | | | - adapted to follow Qt guidelines - regression from 20eb4f94c637d20461f1fef16942841803ada909 Task-number: PYSIDE-1930 Change-Id: Idfd81e2f2f2f54937863b77951b86506f89a9a4a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Shiboken: Optimize attribute access a bit moreChristian Tismer2022-06-207-8/+12
| | | | | | | | | | | Some leftover attributes can be turned into statics, too. The StaticMetaObject needs to be moved into Shiboken in preparation of the following enum checkin. Task-number: PYSIDE-1735 Change-Id: I2172bd785ae229ea5637588c53be660477fc2f0e Pick-to: 6.3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide: speedup all cleanup calls by using PyName for staticMetaObjectChristian Tismer2022-06-172-19/+21
| | | | | | | | | | | | | This was found when debugging attribute access for improving PyEnum (the upcoming Enum Strict patch with forgiving fallback). It provides a quick shortcut for checking attribute names without string generation. Task-number: PYSide-1735 Change-Id: I765016a5a0f13e59cef85f57deebebd456b16a77 Pick-to: 6.3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PyEnum: Use embedding of the Enum module for better execution speedChristian Tismer2022-06-1610-9/+1124
| | | | | | | | | | | | | | | | | | | | | | | | | | The Enum module was optimized several times and is now in good shape. Old Python versions show massive slowdowns. Also, Python 3.6 does not support the functional API. As a general solution, we embed the current enum version to support older Python versions with the same module. Newer Python versions do a normal import. As a side effect, we have no longer to treat the old version Python 3.6 in any special way. This change is further necessary to be able to remove the old enum version, since Python 3.6 still exists in CI. NOTE: Python 3.6 and 3.7 had a hard-to-find refcount error when creating new enums. [ChangeLog][shiboken6] Python Enums use the newest implementation for Python (3.10) for compatibility and speed. Task-number: PYSIDE-1735 Change-Id: I1f105a6b0fb48e9364cb0654ccd9118d39f68542 Pick-to: 6.3 Reviewed-by: Christian Tismer <tismer@stackless.com>
* signature module: QPixMap.save should use str instead of bytesShyamnath Premnadh2022-06-161-0/+5
| | | | | | | | | - the parameter 'format' of QPixMap.save(...) should have a type mapping of char* -> str instead of char* -> bytes Task-number: PYSIDE-1968 Pick-to: 6.3 Change-Id: I48f3e8da73208388b731b63c41893d917fb65d54 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix type hinting for QListWidget selected_indexes() returnShyamnath Premnadh2022-06-161-3/+1
| | | | | | | | | | - the return type should be List[PySide6.QtCore.QModelIndex] instead of List[int] - remove duplicate entry for QModelIndexList Pick-to: 6.3 Task-number: PYSIDE-1934 Change-Id: I9dfaeb15fb5e2c84008b14d96498306520ea83ba Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>