aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Pin qt5 sha1 for 6.3.0 releaev6.3.0wip/pypySimo Fält2022-04-111-1/+1
| | | | | Change-Id: If1d72ad974b4e04b5a8eada39966c8bd1b0ea279 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Cleanup version strings for 6.3.0 releaseSimo Fält2022-04-112-4/+4
| | | | | Change-Id: I01d006e3c22dfd98f275305fa0228174d78bbad8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* build: add project tool to create_wheels.pyCristián Maureira-Fredes2022-04-111-0/+1
| | | | | | | The tool was left out the new script to create wheels. Change-Id: I858303fe359b622f35f3311584da0be3b5e3c6ce Reviewed-by: Simo Fält <simo.falt@qt.io>
* PySide6: Optimize for SizeShyamnath Premnadh2022-04-116-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | build: use the following flag with setup.py to turn off size optimization --no-size-optimization Added the following compiler optimization flags and their corresponding flags on other platforms GCC - -ffunction-sections -fdata-section which segretates data and function section and linker flag --gc-section which removes unused code. - -fno-exceptions to disable exception handling - -Os - Optimize for size. Basically same as -O2 but removes some flags that cause increase in size. (Ran a couple of example and did not see difference in execution time) MSVC - /Gy /Gw /OPT:REF - same as -ffunction-sections, -fdata-section, -Wl, --gc-section - /EHsc same as -fno-exceptions - /O1 instead of /Os because for MSVC /O1 gave the best results. Clang - Same as GCC except for using -Oz instead of -Os. Experiments: Built a wheel with QtCore and noticed a 300kb reduction in size on both Windows and Linux. Built a complete wheel(except QTest) and it gives me a 4 mb size reduction with unaffected performance. Task-number: PYSIDE-1860 Change-Id: Ia5dfa2c4bfde92994c939b5fac0d0831fa3a73ab Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit a88f7b21c61e4aa9efcfb81d7939e44b06df3a0d)
* shiboken6: Move check in inheritTemplateFunction() aroundFriedemann Kleint2022-04-091-2/+2
| | | | | | | Pick-to: 6.2 Change-Id: I1957f5f10fb90a732206718f43ac26e8cbe4ef07 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* doc: skip the documentation build by defaultCristián Maureira-Fredes2022-04-094-12/+29
| | | | | | | | | | | | | This reverse the current approach of building the documentation by default, and replace the skip-docs parameter by a build-docs one. A warning is printed when the --skip-docs is used, and another warning is displayed when using --doc-build-online without the --build-docs option. Change-Id: I2bf8302881b51e9831795a7e881b106022cdffa8 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix uninitialized variable causing crash when using shiboken.deleteLuc Touraille2022-04-091-0/+1
| | | | | | | | | The isQAppSingleton flag was not initialized, meaning that any shiboken wrapper could be randomly considered as a QCoreApp one. Pick-to: 6.2 5.15 Change-Id: I96c836762a2ad2a6e8978dee10965c086bd50645 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken6: Remove namespace from smart pointer namesFriedemann Kleint2022-04-093-12/+31
| | | | | | | | | Rename the functions for clarity and remove the namespace ("std.shared_ptr_Integer" instead of "std.std_shared_ptr_Integer"). Task-number: PYSIDE-454 Change-Id: I3274630aa9c1b10258d34b75fc6b7bec6f45c519 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Doc: Enable sphinx_copybutton extension for PySide tooVenugopal Shivashankar2022-04-082-6/+1
| | | | | | | | In addition, do not disable the copy_empty_lines config in the Shiboken project. Change-Id: I453c3df05d820052bc187d28a60d4e870b2c62f4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* doc: new theme to follow the new Qt Doc styleCristián Maureira-Fredes2022-04-0830-2304/+195
| | | | | | | | | | | | | - Use 'furo' sphinx theme which offers a look-and-feel similar to the new Qt Documentation theme. - Change a few colors and styles to keep some details of the previous look-and-feel. - Add sphinx-copybutton extension to enable the copy-button feature against the snippet blocks. - Remove the 'pysidedocs' theme. Change-Id: I2be7186c5b043b4c75c65783abc2eab4056c493e Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* doc: move toc to the bottom of the module pageCristián Maureira-Fredes2022-04-081-2/+5
| | | | | Change-Id: Ibdb1eac47c57aef49151c70c18a4e6e2bb4782c1 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* doc: use sphinx panels for the offline docCristián Maureira-Fredes2022-04-082-171/+120
| | | | | | | | | Removing the special case where a HTML table was generated instead of the sphinx-panels. Change-Id: Ic2fe6276cf63ca559c14d9309c2e7cbd3515f2c3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Add readBytes and writeBytes functions from QDataStreamShyamnath Premnadh2022-04-087-6/+124
| | | | | | | | | | | - along with the addition of these functions, a common.xml is created to stores all the common templates Task-number: PYSIDE-890 Pick-to: 6.2 Change-Id: I4fadfe77a38635f15a7aef04adeac949c2d61b5d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix accepted platform configs in CISimo Fält2022-04-081-0/+3
| | | | | | | | | Change in qt5 caused one of the accepted ci configs to depend such config which was not accepted. Pick-to: 6.2 Change-Id: I7229fc90312a23d87cc87fc2e52453dae104a297 Reviewed-by: Christian Tismer <tismer@stackless.com>
* QAction: Add setMenu() and menu()Cristián Maureira-Fredes2022-04-083-3/+24
| | | | | | | | | | | | | | | | | | | | After the changes in Qt6 related to moving QAction completely to QtGui, the 'on-demand' functions associated to QMenu were not properly exposed. This patch manually adds setMenu()/menu() using QObject's. A simple test case was added. [ChangeLog] QAction.setMenu() and QAction.menu() were implemented. Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Pick-to: 6.2 Fixes: PYSIDE-1627 Change-Id: Ib8102a9cf513ee2e13ff71751b1167ca0146af31 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* shiboken6: Enable adding modifications to declare-functionFriedemann Kleint2022-04-083-7/+11
| | | | | | | | | | Amends 40483a4249306b62029987d03e7de57d456954b2. Pick-to: 6.2 Task-number: PYSIDE-1627 Change-Id: I1521e7436749fb95f282a07539310257dca3918f Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add changelog 6.3.0Friedemann Kleint2022-04-081-0/+214
| | | | | Change-Id: I4cdb210d21152910e2d9c465455cebac66161197 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Refactor CppGenerator::argumentNameFromIndex()Friedemann Kleint2022-04-074-103/+79
| | | | | | | | | | | | The function was returning the argument class in a pointer passed in. Split this functionality out to a separate function argumentClassFromIndex() for clarity. Use exceptions to signal errors instead of writing #error directives. Pick-to: 6.2 Change-Id: Icfdf4344bfd3bab0e65c308bebde21f6940bdbfd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6/tests: Fix a few warnings by clang and type system parsingFriedemann Kleint2022-04-073-5/+3
| | | | | | Pick-to: 6.2 Change-Id: Id4d26793bd17e1f6597e815603a3adb2262dad10 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Add a debug operator for the class contextFriedemann Kleint2022-04-072-0/+21
| | | | | | Pick-to: 6.2 Change-Id: I3e5a7b413da3f8dd84a35e2029f23d2d2dae910c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Refactor the class function queriesFriedemann Kleint2022-04-077-20/+25
| | | | | | | | | | | Change the meaning of FunctionQueryOption::Constructors to "constructor except move/copy" since that is what is desired in most cases. Add FunctionQueryOption::AnyConstructor for the old purpose. Pick-to: 6.2 Change-Id: I600b02513b9b9e72d7cbd60e22cda7549133ab39 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add a test for QSharedPointerFriedemann Kleint2022-04-076-0/+172
| | | | | | | Pick-to: 6.2 Task-number: PYSIDE-454 Change-Id: I2cb352390a9c6fcc32f8ef871a6de3023ab03237 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Fix module TOC generationFriedemann Kleint2022-04-075-9/+19
| | | | | | | | | | Change b60cdf97b41ab6db977c5acd96d491003a5a046d introduced a bug in that the .rst doc files were generated with lower case file names. This upset the fancy toc formatter. As a drive-by, fix empty columns. Change-Id: Ic4600b5bd7a9152cce2b74ed502acbc71b8df891 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Fix build after deprecation of QVERIFY_EXCEPTION_THROWNFriedemann Kleint2022-04-071-0/+1
| | | | | | | | | | qtbase/ed343669f7c219b89449762cce086cb036a9a8f2 deprecated QVERIFY_EXCEPTION_THROWN and its helper useVerifyThrowsException(). Remove the function. Change-Id: Ic6484e1b984df8f3317225fb1f9dad0fa91609ad Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* shiboken6/Type system parser: Use contiguous enum for StackElementFriedemann Kleint2022-04-062-90/+108
| | | | | | | | | | | The old approach with the bit masks does not really scale and makes it hard to add new values. Replace by a contiguous enum with First/Last entries and check functions. Task-number: PYSIDE-454 Change-Id: If34942ce0d2e496f34a17a84a7c8406895cf1c16 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* shiboken6: Add a function to check argument countsFriedemann Kleint2022-04-063-37/+43
| | | | | | | | | This reduces the generated code. Task-number: PYSIDE-661 Change-Id: I4d06fd9223a8e87fbe3a7e2d8c6a482e56a10cf5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Test nullptr_tFriedemann Kleint2022-04-055-0/+15
| | | | | | | | | Testing the support introduced by 3c2ef04c9eade4226f139064c6c45cb4819834e0. Task-number: PYSIDE-854 Change-Id: I2d7276baf2c81e24f3f7389448352541a78e18bd Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Add attribute "value-check-method" to smart pointersFriedemann Kleint2022-04-0510-23/+96
| | | | | | | | | | | | | | | | "value-check-method" (operator bool, std::optional::has_value()), is the opposite of the existing "null-check-method" (QSharedPointer::isNull()) and takes precedence over it. Synthesize these methods for smart pointers as well. As a drive-by, actually generate the value check and null check methods. Add a test for std::shared_ptr. Task-number: PYSIDE-454 Change-Id: Ie3b6f7042883888d23c9e6bed8a1409f0bdb56b9 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* shiboken6: Fix wrong Python argument name for functions with one parameter ↵Friedemann Kleint2022-04-053-19/+7
| | | | | | | | | | | | | | and default value When a default value is present, an argument list needs to be used. Fix CppGenerator::argumentNameFromIndex() to use OverloadData::pythonFunctionWrapperUsesListOfArguments() instead of OverloadData::isSingleArgument() and remove the latter. Pick-to: 6.2 Task-number: PYSIDE-454 Change-Id: I263bce12b8103fbb729180188843f45d3e430e64 Reviewed-by: Christian Tismer <tismer@stackless.com>
* CMake: Clean up the config to find doc toolsVenugopal Shivashankar2022-04-054-88/+118
| | | | | | | | | | | Maintain the doctools config in a single place, and include it wherever necessary. Done-with: Alexandru Croitor <alexandru.croitor@qt.io> Pick-to: 6.2 Change-Id: Ib22e8676aa39bbddb616c7018b01b046bb33ae82 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* shiboken6: Add a check for null to the smart pointer accessFriedemann Kleint2022-04-042-4/+21
| | | | | | | | | | | | If a null check method exists, generate a check into getattro() with a better error message than the attribute access error. This will be vital for std::optional to suppress a C++ exception being thrown. Pick-to: 6.2 Task-number: PYSIDE-454 Change-Id: I6d8e16e31c094aa695e150990c471007bcd34eb9 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Refactor CppGenerator::writeCppSelfDefinition()Friedemann Kleint2022-04-042-36/+76
| | | | | | | | | | Introduce flags for the boolean parameters and extract helper functions for writing smart pointer cppSelf. Pick-to: 6.2 Task-number: PYSIDE-454 Change-Id: I792fc5dcad67468bf639e807aa24b36e1c9f58eb Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Extend the bool cast functionFriedemann Kleint2022-04-042-18/+41
| | | | | | | | | | | | | | | Introduce a struct for the bool cast function that has a bool indicating whether the function returns true (operator bool(), std::optional::has_value()), or false (QSharedPointer::isNull()). Extract a helper to write the actual expression, hereby fixing the hitherto hard-coded function name. Pick-to: 6.2 Task-number: PYSIDE-454 Change-Id: I57b428febc30a9db7d3638f1c555943d2894ef58 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Refactor the smart pointer get/setattro methodsFriedemann Kleint2022-04-041-48/+27
| | | | | | | | | | Streamline the CppGenerator functions as well as the code they generate. Pick-to: 6.2 Task-number: PYSIDE-454 Change-Id: If789b432b3edcdedac0b062241d86b8a8dc9b332 Reviewed-by: Christian Tismer <tismer@stackless.com>
* flake8: fix style issues on testingCristián Maureira-Fredes2022-04-029-25/+24
| | | | | Change-Id: I4e3e922ff95040999bc3bb1463c2e29783d5ee14 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* flake8: fix style issues in coin filesCristián Maureira-Fredes2022-04-022-26/+30
| | | | | Change-Id: Ie36b52d68cdf85f7f1ab34082461f1875313d17f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* flake8: fix styling issues in tools/Cristián Maureira-Fredes2022-04-0222-139/+132
| | | | | | Change-Id: I8cbf5d521900df4f55abf8f68997f8a71437f722 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* doc: Add cross compilation guideCristián Maureira-Fredes2022-04-021-0/+252
| | | | | | | | | | | | This guide is based on the commit message from the change that introduced the option to use setup.py to cross compile Shiboken (module) and PySide, plus additional information to configure all the requirements to start the process. Fixes: PYSIDE-1810 Task-number: PYSIDE-802 Change-Id: I03e1b803a809010bc3acd350b518b3c46741619e Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* shiboken6: Only generate argument error handling when neededFriedemann Kleint2022-04-022-7/+20
| | | | | | | | | | Add a function to check whether argument error handling is needed (function has arguments or is a QObject constructor) and do not generate the variables if that is not the case. Pick-to: 6.2 Change-Id: I8363f16162da55a8844d4e4117e9ea7b41abb440 Reviewed-by: Christian Tismer <tismer@stackless.com>
* doc: change http by httpsCristián Maureira-Fredes2022-04-0166-68/+68
| | | | | | Pick-to: 6.2 Change-Id: Id796694e947643152dc0d57dd760efb89ddd8f16 Reviewed-by: Christian Tismer <tismer@stackless.com>
* examples: replace http by httpsCristián Maureira-Fredes2022-04-01263-266/+266
| | | | | | Pick-to: 6.2 Change-Id: Ib53667e03a2dea2afea73a344d5749d37d59c52b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* doc: use https in the licenses and readmesCristián Maureira-Fredes2022-04-0110-26/+26
| | | | | | | Pick-to: 6.2 Change-Id: I9acb017a527b0195a896437b9007e3843a410d7d Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken6/Type system parser: Refactor attributes parsingFriedemann Kleint2022-04-011-26/+19
| | | | | | | | | Move the calls to applyComplexTypeAttributes() into the parseXX() functions. Task-number: PYSIDE-454 Change-Id: I00942f4706fc268f5a61a06623e6cc5e85a34e27 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add QPyQmlParserStatusFriedemann Kleint2022-04-019-7/+215
| | | | | | | | | [ChangeLog][PySide6] class QPyQmlParserStatus for handling QML parser status changes has been added. Fixes: PYSIDE-1876 Change-Id: Ic1066924ec85dc8633f959342921c1d03da1aee4 Reviewed-by: Christian Tismer <tismer@stackless.com>
* setup: fix PySide6.__all__ after the wheel splitChristian Tismer2022-04-011-0/+29
| | | | | | | | | | | | | | The __all__ variable can no longer reliably be generated during compile time. - look into the FS to get a list of available modules - apply the existing __all__ order for convenience - make sure to call this function outside of a build, only. Change-Id: Ibaf300447e86127e39a98a9150b7e8b4d8ced27d Pick-to: 6.2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* doc: use https in some source code filesCristián Maureira-Fredes2022-03-314-5/+5
| | | | | | | Pick-to: 6.2 Change-Id: Ic48c1016638cb6fca544139ef589223b45c656c7 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* PySide6: Fix QMetaProperty::Write(..)Shyamnath Premnadh2022-03-313-1/+18
| | | | | | | | | | | | | | | Change 108d82d2ca5323652a50706b37f829b9f0457367 introduced a regression that when enum is passed to a QVariant and that QVariant is processed from C++, it does not work as expected. This patch handles the case of enum, separately for the function under consideration. Pick-to: 6.2 Task-number: PYSIDE-1870 Change-Id: I5d002cb36f23d8763de737578af7b52d8259a306 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* build: update wheel namesCristián Maureira-Fredes2022-03-302-28/+28
| | | | | | | | | | | | - Removing extra cpX arguments from the wheel name - Use PEP600 to include the glibc version on the wheel name, instead of manylinux1. - Use 'abi3' on windows instead of 'none', because it's already supported on Windows Change-Id: I312586b72d38f2c5c4835ba5040d064e44c80e29 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* setup: re-enable shiboken6-genpyi after total embeddingChristian Tismer2022-03-302-5/+9
| | | | | | | | | | | | | | | | | | The script shiboken6-genpyi did not work any longer, after we turned all Python modules into embedded, source-less versions. It is no longer possible to access a Python source file from the FS after shiboken was built. The only way is access via import, which is intentioned. The executable code of gyi_generate.py needed to be moved into function main, to make it importable instead of always executing. Change-Id: I4632bbbe5858fb284158ef3101223ccd5ba8f362 Pick-to: 6.2 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* linguist: fix rpath on macosCristián Maureira-Fredes2022-03-301-0/+1
| | | | | | Pick-to: 6.2 Change-Id: If83404731096e17889523ded362be31e5398a441 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>