aboutsummaryrefslogtreecommitdiffstats
path: root/sources
Commit message (Collapse)AuthorAgeFilesLines
* shiboken6: Remove redundant operator declarationHEADdevFriedemann Kleint2 days2-4/+0
| | | | | | | Pick-to: 6.10 Change-Id: Ie3007e3d0e5baf0440788ee9a89133ea4a003f70 Reviewed-by: Ece Cinucen <ece.cinucen@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Split out the spaceship operator testsFriedemann Kleint3 days11-39/+124
| | | | | | | | | On this occasion, add a test for a free operator<=>() behind guards. Task-number: PYSIDE-3245 Change-Id: Ife8f17add0a8f1c3bd1194a5dfabce4f97c78006 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Move comparison operator enum type out of AbstractMetaFunctionFriedemann Kleint3 days7-69/+97
| | | | | | | | | Turn it into a flag to be able to specify masks to be synthesized. Add a function checking for ordering comparisons for later use. Task-number: PYSIDE-3245 Change-Id: Ibab47528f92ff8859677a85cccdcad50a767ccac Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Do not generate reverse comparison operatorsFriedemann Kleint3 days1-1/+7
| | | | | | | | | | This leads to duplicated code in Py_tp_richcompare since CppGenerator::writeRichCompareFunction() does not handle it and CPython swaps the arguments itself. Task-number: PYSIDE-3245 Change-Id: I39e9bf6adb2f737ad5f66327cd5a6f9447e86c9d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Move argument manipulation functions from AbstractMetaBuilder ↵Friedemann Kleint3 days3-25/+31
| | | | | | | | into AbstractMetaFunction Task-number: PYSIDE-3245 Change-Id: If3590dd1fa54c45de0295973cad37bce74ea682f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Refactor signature formatting for overload decisor commentsFriedemann Kleint3 days2-30/+41
| | | | | | | | | | | | | Separate the overload decisor comment code path from the minimal signature and use in all relevant places in the generated code. Remove the Qt signature normalization. Add more information about operators. Task-number: PYSIDE-3245 Change-Id: Id023d36a3b9112fccb36c9f8a03e13fac6628b75 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Add messages about synthesized functionsFriedemann Kleint3 days8-6/+106
| | | | | | | | | | Extend the internal flags of AbstractMetaFunction by C++ 20 operator information and add helpers to format messages based on that. Task-number: PYSIDE-3245 Change-Id: I65311e973f8995cd2535e4b936e9f576fa312b1b Reviewed-by: Ece Cinucen <ece.cinucen@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Move AbstractMetaFunction::Flags out of the classFriedemann Kleint3 days7-35/+39
| | | | | | | | This enables using them for messages and other things. Task-number: PYSIDE-3245 Change-Id: If2acccbfdbc53d28f84cfe5341898347a9938c53 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Rename traverseOperatorFunction() to traverseFreeOperatorFunction()Friedemann Kleint3 days2-10/+13
| | | | | | | | | | Make it clear that the function is meant to be called for the global namespaces or other namespaces, not for classes. Add assert and comment. Task-number: PYSIDE-3245 Change-Id: I0e5e07c7822286ff148c5b76ff292d45d799165d Reviewed-by: Ece Cinucen <ece.cinucen@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Add tests for non-homogeneous comparisonFriedemann Kleint3 days2-0/+16
| | | | | | Task-number: PYSIDE-3245 Change-Id: I84bac9ef5afdbb4356884a7933ed8209d886d836 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libshiboken: Fix crash when multiple threads attempt to retrieve the same ↵Friedemann Kleint3 days1-0/+4
| | | | | | | | | | | | | | | override Re-check for None on the cache passed in by reference after acquiring the GIL in case another thread set it in the meantime. Amends eeacd90bdb71cebcdfb8d285254d7e42ddc4ff79. Fixes: PYSIDE-3246 Task-number: PYSIDE-2916 Pick-to: 6.10 Change-Id: I9c1b9ac465a36ca885c5f7c0ee1b6f58e91dcf4d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6-Android: Add QtWebViewShyamnath Premnadh4 days1-2/+6
| | | | | | | | | - QtWebView was previously missing from the Android build configuration. Pick-to: 6.8 6.10 Fixes: PYSIDE-3248 Change-Id: I11230b9bff6a45bee3af0dba498e7d76ca678e61 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Type hints: Add missing optional return typesEce Cinucen5 days1-0/+25
| | | | | | | | | | | | | | | | | Several functions can return None, but the generated stubs used non-optional return types. Added these functions to the missing_optional_return list so the typing information matches actual behavior. Fixes: PYSIDE-3225 Fixes: PYSIDE-3218 Fixes: PYSIDE-3203 Fixes: PYSIDE-3197 Fixes: PYSIDE-3196 Fixes: PYSIDE-3195 Fixes: PYSIDE-3189 Pick-to: 6.10 Change-Id: I3ccb4285755f647cb9925156940ce878408fb099 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide6-Android: Fix WebView buildShyamnath Premnadh5 days1-1/+2
| | | | | | | | | - Amends 6e6488f86942482f990993938b5d3520a2e9fadd Pick-to: 6.8 6.10 Fixes: PYSIDE-3248 Change-Id: I9cf9cb92d2d92eb586c4bafd6939ede51078519d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Docs: VSCode Extension for PySide6Shyamnath Premnadh8 days4-1/+117
| | | | | | | | | | - Docs for the `Qt Python` extension for Visual Studio Code and its features for PySide6 development. Pick-to: 6.10 Change-Id: I9dfc80b8dab651d3615fcdf4878c674222a74dee Reviewed-by: Ben Cho <ben.cho@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix top-level configuration for IDEAlexandru Croitor9 days1-0/+3
| | | | | | | | | | | | | | | | Shiboken6Config.abi3.cmake checks to include Shiboken6Targets.cmake if the Shiboken6::libshiboken does not exist, but it should always exist in a top-level build. Re-add the Shiboken6::libshiboken alias. It is unclear why it was removed in the first place, so just to be safe, only create the alias if it does not already exist. Amends 39bf64f845d6b759ebc726e85949e82dab678d37 Change-Id: I1d5f29cd770fde7288dcd27703304b8fa5d1f2f5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libpyside: Add categorized debug output of names of @QEnum meta typesFriedemann Kleint9 days1-0/+3
| | | | | | | Pick-to: 6.10 Task-number: PYSIDE-2840 Change-Id: I5dbc5187efc327fd81e84f4a26a03a23b797df25 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Remote Objects: Enable tests on macOS / ARMFriedemann Kleint11 days1-3/+0
| | | | | | | | Amends 19abd816e73bebdd489408d0a3b7676822bff39c. Task-number: PYSIDE-862 Change-Id: Icf499f17eb7cf0e4b3805efbfc98ab462063574e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libshiboken: Remove PepErr_GetRaisedException()Friedemann Kleint11 days4-18/+4
| | | | | | | | | | | | | | The function was wrongly implemented, it is actually meant to clear the error state and be used along with PyErr_SetRaisedException() to replace the deprecated PyErr_Fetch()/Restore(). It cannot really be implemented in terms of PyErr_Fetch()/Restore(). Partially reverts 9aabb3a509594f59306a96679938f2f43a9830e6. Task-number: PYSIDE-2747 Change-Id: I5ee57112c905e9112b758e27904bbf4fa768aeea Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix passing named tuples in QVariantsFriedemann Kleint11 days2-1/+50
| | | | | | | | | | | | | Prevent them from being converted to QVariantList by checking the exact type. Amends c47c5bdbc8e844c2c3c99e2b5e594b5615d5ae4f. Fixes: PYSIDE-3244 Task-number: PYSIDE-3206 Pick-to: 6.10 Change-Id: I26656d871accc868cb77d95b7b8567e380f46390 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Update documentation on porting examplesFriedemann Kleint11 days1-2/+8
| | | | | | | | | List useful environment variables and remove the snake case point since it causes maintenance problems. Pick-to: 6.10 Change-Id: I5c3d5e182b471ab3983e3a124ad95389d0d9bc7f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Enum forgiveness mode: Move option checks upFriedemann Kleint11 days1-2/+5
| | | | | | | | | | In lookupUnqualifiedOrOldEnum(), move the option checks up so that the function does unnecessarily loop over the MRO to resolve enumerations when they are disabled. Task-number: PYSIDE-1735 Change-Id: Ifc5c869b21e2f1d291784beaf192e8e328f4966b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix the type hint of QMetaObject.className() to be strFriedemann Kleint11 days1-0/+3
| | | | | | Pick-to: 6.10 Change-Id: I8e428c5b1cb1c57cc628b4113fa58dd7889117c8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Split off shibokengeneratorFriedemann Kleint12 days15-102/+142
| | | | | | | | | | | | Split the generator executable off to a new directory shiboken6_generator. Adapting the build scripts and cmake configuration. Task-number: PYSIDE-962 Task-number: PYSIDE-1587 Change-Id: I301f96daace0331b0abc17bc59b44cd2396b9953 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Move the shiboken-generator source aroundFriedemann Kleint12 days284-0/+0
| | | | | | | | | THIS COMMIT WAS GENERATED BY A SCRIPT Task-number: PYSIDE-962 Task-number: PYSIDE-1587 Change-Id: I58b05c3d05606efb6303193f2d7f907a0ab5741b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Extend target triplet test by aarch64-poky-linuxFriedemann Kleint2025-11-211-1/+7
| | | | | | | Task-number: PYSIDE-3235 Task-number: PYSIDE-3105 Change-Id: If2a30172bdb5544d221e5cb713ec9336600c18cc Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Add a triplet classFriedemann Kleint2025-11-2111-348/+504
| | | | | | | | | | | Extract the architecture/platform information from compilersupport.cpp into a separate Triplet class which can be tested independently and is not tied to the shiboken logic (initialization to host defaults, etc). As a result, compilersupport.cpp becomes much cleaner. Task-number: PYSIDE-3105 Change-Id: I3ea709a02184c73814dc34686be75017fa1391fa Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libpysideqml: Extract QmlListPropertyMixinFriedemann Kleint2025-11-214-61/+205
| | | | | | | | | | Extract a mixin class handling registration of a QQmlListProperty<> and providing virtuals for the list functionality. It can be used by Bridges or when migrating some Bridges functionality into PySide (for example, list properties wrapping a Python list). Change-Id: I18db0a8196b0f8529e6d438744429a5630ee297c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6/compilersupport: Fix building on Yocto using clang++Friedemann Kleint2025-11-191-8/+1
| | | | | | | | | | | | | | Remove the option -nostdinc, which causes it to complain about "'type_traits' file not found". The option was apparently added for historic reasons and is apparently no longer needed. Fixes: PYSIDE-3235 Pick-to: 6.10 Change-Id: I3ab4bd9bf1e523e2c6ab6e655ef8d2cc4e865599 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6/compilersupport.cpp: Remove values that are only used for loggingFriedemann Kleint2025-11-193-33/+4
| | | | | | | | | Remove the getters/setters and make them function-local as they unnecessarily clutter the code. Task-number: PYSIDE-3105 Change-Id: Ia56f65ae169e1e9e7b96ca2d98b6694ae9f3f208 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Output the host OS in mjb_shiboken.logFriedemann Kleint2025-11-171-0/+2
| | | | | | | | | Complements 91d0ec1e864c5c657e351c32af1f8d78a26c543d. Task-number: PYSIDE-3235 Pick-to: 6.10 Change-Id: Ib106f2d9e0804125a434da7119aff8c7d317316e Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix Shiboken6Tools CMake module to find Python on manylinux_2_34, take 2Friedemann Kleint2025-11-172-2/+2
| | | | | | | | | | | | Use Development.Module in find_dependency() when not cross-compiling. Amends a377a3b253b6f584384ad6e22ca38f115b11fc6d. Fixes: PYSIDE-3233 Task-number: PYSIDE-3138 Pick-to: 6.10 Change-Id: I0cabb3c85994ecd725c033d8728f02b334911b0c Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Documentation: Fix wrong Qt Quick QML types referenceFriedemann Kleint2025-11-151-5/+20
| | | | | | | | | | | When looking for the -qmlmodule.webxml file, try the regular name first before falling back to a wildcard search. Fixes: PYSIDE-3238 Pick-to: 6.10 6.8 Change-Id: Ia432ecf7947bf875123df8d989945bc2d88690ed Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libpyside/libpysideqml: Introduce flags for property argumentsFriedemann Kleint2025-11-144-155/+71
| | | | | | | | | This allows for removing a number of free functions and eventually better separating QmlListProperty from Property. Task-number: PYSIDE-3227 Change-Id: If2806f86bbbb615e59655d4f9a19b0fe87219fb5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libpyside/libpysideqml: Refactor property argument parsingFriedemann Kleint2025-11-143-56/+74
| | | | | | | | | | | | | | Take over arguments only if they are neither null nor Py_None and simplify checks accordingly. Make the error message more precise. With that 2aff6a35a9aa2f233c9801456daa6986437d2647, can be partially reverted. Task-number: PYSIDE-3227 Change-Id: I335db395e969415022581e1ec95a7e3715725bf1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libpyside: Introduce a helper function for creating propertiesFriedemann Kleint2025-11-143-16/+52
| | | | | | | For use in QtRemoteObjects and Python bridges. Change-Id: Ica4d3c36cc87db958353d7d6de25806acdf5d8b7 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libpyside: Fix compiler warning in Limited API buildsFriedemann Kleint2025-11-141-1/+1
| | | | | | | | | | Move #ifdef, fixing: sources/pyside6/libpyside/pyside.cpp:1231:13: warning: ‘void PySide::formatPy_ssizeArray(QDebug&, const char*, const Py_ssize_t*, int)’ defined but not used [-Wunused-function] Pick-to: 6.10 Change-Id: If2bd096c675a86ff0e403ef0c97928615580787a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Generate [[maybe_unused]] for overriden function parametersFriedemann Kleint2025-11-121-0/+2
| | | | | | | It silences some warnings caused by custom code injections. Change-Id: Ic33c9b59a4ad8f3b65803f1c1e6c23b706d221bb Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Revert "Fix Shiboken6Tools CMake module to find Python on manylinux_2_34"Friedemann Kleint2025-11-122-3/+3
| | | | | | | | | | | | | | This reverts commit b70d69b3e4d0970640ef8cce1b7c4413ad23776e. The commit breaks cross builds. Pick-to: 6.10 Task-number: PYSIDE-3233 Task-number: PYSIDE-3138 Change-Id: I4303f728e1bc758fe21d29cd4fed15bda93d3fce Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> (cherry picked from commit a4461788af43ff62738efe146799950db0929578) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix Shiboken6Tools CMake module to find Python on manylinux_2_34Friedemann Kleint2025-11-112-3/+3
| | | | | | | | | | | | Use Development.Module in find_dependency(). Amends a377a3b253b6f584384ad6e22ca38f115b11fc6d. Fixes: PYSIDE-3233 Task-number: PYSIDE-3138 Pick-to: 6.10 6.10.1 Change-Id: I3516ff39ce685e722960ed234d8a0d699981a3be Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PySide6-Android: Use ANDROID_API_VERSION for SDK jar locationShyamnath Premnadh2025-11-111-3/+9
| | | | | | | | | | | | | - For Java packaging, use ANDROID_API_VERSION environment variable if set, otherwise fall back to CMAKE_ANDROID_API. This enables supporting the CI which sets ANDROID_API_VERSION to 36 and also local builds using the latest API level supported by the NDK. - Added a small comment as to why Qt for Python builds can use API level of 35 as opposed to Qt which uses 28. Pick-to: 6.10 6.10.1 Change-Id: Id5cb2d5c6ab235b365c26da79b5e65bbe30c81e9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide6/Property: Fix read-only properties when using the decorator syntaxFriedemann Kleint2025-11-032-5/+83
| | | | | | | | | | | The @setter decorator causes the property to be recreated with Py_None set for the non-existent members, apparently due to a long-closed Python bug (see_property_copy()). As a band-aid fix, check for Py_None. Fixes: PYSIDE-3227 Pick-to: 6.10 Change-Id: Ib818e9930bd598306270377e26e625bfa9692a92 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Documentation: Mention that Shiboken6Tools is in shiboken6_generatorFriedemann Kleint2025-10-301-4/+6
| | | | | | | | | Amends fa00d37d891d20f9080afeb2003cdd9675cb86a3. Task-number: PYSIDE-3138 Pick-to: 6.10 Change-Id: I76a3d54f34ff705abdcb5749a0a06300fd8bd80e Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Remove generation of deprecated type indexes and type arrayFriedemann Kleint2025-10-284-31/+1
| | | | | | | | | | | | | As change 6a6cf8d6c66e130b541f3d041d0da609f8b97dd0 proved, they are apparently not used by anyone (except for the scriptable application, which worked by coincidence using index 0). Complements 7f69d4d562e1d19efd2c505dceea387a4a87dcfe. Task-number: PYSIDE-2404 Task-number: PYSIDE-3155 Change-Id: I573af9ebff95f2c245caac055aeab2a5429bdaaf Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Do not use global variable for the generated TypeF() functionFriedemann Kleint2025-10-273-14/+10
| | | | | | | | Access the type array instead of using a global variable. Task-number: PYSIDE-3155 Change-Id: If379d4c751604c561d8531ce3fde7dcd32ea4725 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libshiboken: Prefix warning/error messagesFriedemann Kleint2025-10-279-32/+47
| | | | | | | | Complements 83be9f6e76b1976050a0f17cb6e1c5ebd288232c Task-number: PYSIDE-3155 Change-Id: I7aa85b99bfeb4e4ca9a5d0dc83562a60ef94f755 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Test whether enumeration properties have the proper flag set in QMetaPropertyFriedemann Kleint2025-10-261-2/+32
| | | | | | | Task-number: PYSIDE-3217 Pick-to: 6.10 Change-Id: If23e001b6b7255e02bc80ec13bbe10e1b1f4ce4e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Introduce a helper template for writing class codeFriedemann Kleint2025-10-243-30/+50
| | | | | | | | | Add a helper function that checks whether to generate the class and adds the config scopes. Task-number: PYSIDE-3155 Change-Id: I82aa35d9655ff51220602b9cad94c9c78e851c4e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* type-hints: Update the parameter kind after variadic positional parameterEce Cinucen2025-10-231-0/+8
| | | | | | | | | | | - With Python 3.14, the parameter kinds are more strict, meaning after the variadic posional parameter there can only be keyword parameter. - All the debug outputs showed the correct parameter kinds however registry/existence_test.py continued to fail because of a ValueError. - This patch works because `replace()` produces new Parameter objects, which clears any hidden internal state, satisfying Python 3.14+’s stricter Signature validation Task-number: PYSIDE-3147 Pick-to: 6.10 Change-Id: Id10db78d7f1a3c06683a1da378640a8aada34e74 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix tests using the Wayland platform pluginFriedemann Kleint2025-10-233-9/+6
| | | | | | | | | | | | | Remove the loop ensuring the window is mapped introduced by 918cd72f5eaebf56287a5ab0ac2e149ba1617a57, since on Wayland, the paint event occurs there, causing a hang. This loop is usually used to ensure a window is in a deterministic state for playing mouse events, etc, but for paint events it should not be required. Skip the native event test for Wayland, too. Change-Id: I2b44dc098873614e2b8d9bc54444917fd4905e9f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>