aboutsummaryrefslogtreecommitdiffstats
path: root/sources
Commit message (Collapse)AuthorAgeFilesLines
* feature: Supply switching for newly created objectsChristian Tismer2021-02-111-0/+4
| | | | | | | | | | | | | | | Switching was quite complete, but when the module with a feature selection created a new object, no switching of the new object happens. This was a pretty hard to find bug, but the solution was trivial. Task-number: PYSIDE-79 Fixes: PYSIDE-1478 Change-Id: I663a562d4d9512b627b3add37df0908f9d785e1f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit d158720ec4dd3fe8623faaf9afcb2e7f9f368e51) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Silence the example_gallery toolFriedemann Kleint2021-02-101-1/+5
| | | | | | | | | | Add a --quiet option and use that for quiet builds. Task-number: PYSIDE-1490 Change-Id: I6b8a3fa159acb85dee5fbc064991a09a9fa6ceda Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 9f8fc934818c3ae7473fe6258056bc7c7bf9f718)
* PySide6: Add the logo as a resource to libpysideFriedemann Kleint2021-02-102-0/+7
| | | | | | | | | Use it in prominent examples. Change-Id: Ifee67802194931bbd56fbe6e6bfa4f3c18fda781 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit ac7365aa78d78a3693c46e2177df3216d0a40628) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* signature: Provide fixes and improvements, Part 1, addendumChristian Tismer2021-02-101-5/+4
| | | | | | | | | | | | | | | | | | This patch had a way too complicated method to find out if something is a method, and this broke on Python 2 because we don't have the __qualname__ attribute everywhere. But this can be done much easier: We check the type and see if it is a function or builtin function. Everything else must be a method, no matter what it is :) Change-Id: I07e5690f36e4ed4d50ea5e203233b369dc70fa5f Task-number: PYSIDE-510 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 609bd8121b9a45846b236ecf51226da026651d51) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc: fix responsiveness of the pageCristian Maureira-Fredes2021-02-102-12/+110
| | | | | | | | | | | | Adding some cases to properly show the page on mobile devices. Fixes: PYSIDE-1498 Change-Id: Ia8ee234d09e5246745706f5b6aca29fe31075c04 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 19bc892133ada1ceae68eb42ce330e2599e2ec33) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QQuickItem & co. not working as property typesMaximilian Goldstein2021-02-101-0/+5
| | | | | | | | Change-Id: I562672534124edb5485bd75f84d8f60130173310 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit ad51ac78b6675f8d485b49891d95d2e8876fdab0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc: use example gallery tool in build processCristian Maureira-Fredes2021-02-102-14/+13
| | | | | | | | | | | | | | | | This enables the gallery generation tool in the CMake-based process in charge of building the documentation. The old 'index.rst' file was removed, and rules were added to the .gitignore to avoid adding the generated files. Fixes: PYSIDE-1490 Change-Id: I71a5a9e34ce18f42dbc7af8a3e4be65924a79d67 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 75a50de5787fbc14a9183e50b10cd3a57495ec1d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6/Documentation: Fix formatting tables on QIODevicesFriedemann Kleint2021-02-103-0/+24
| | | | | | | | | | Flush the device before returning the position which is used in the AlignedField helper. Task-number: PYSIDE-841 Change-Id: Id1be81d2819f9682267930076898c79cd68c2bbf Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit da15fc958dafc51901431cf5d9b98b082c8c2690)
* shiboken6/Documentation: Fix the TOC tableFriedemann Kleint2021-02-091-30/+19
| | | | | | | | | | | Change writeFancyToc() to output a table like the Qt documentation (3 columns). Task-number: PYSIDE-841 Change-Id: I05a53e4c78ffb8022e6e3fb6db0e6387b953eafd Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit e20d9db9e9dc8d599b76873d90a34acafe9fd9fe) Reviewed-by: Christian Tismer <tismer@stackless.com>
* doc: add tool to generate examples galleryCristian Maureira-Fredes2021-02-092-9/+23
| | | | | | | | | | | | | | | | | | | | | | This script generates a gallery for all the example currently in pyside-setup/examples. Using this tool will overwrite the index rst file for the examples located in 'sources/pyside6/doc/examples/index.rst Additionally, to display the code of each example, this will generate one extra .rst file for each example that contains a .pyproject file, for example: 'sources/pysides6/doc/examples/example_widgets__tetrix.rst' Currently, the usage of this tool is not incorporated in the documentation building process. Task-number: PYSIDE-1490 Change-Id: I78546d4c7905fd8b521f4112457980b4d1d56860 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit e8eac85a5db8386689ffe174694f82c1e5dad854) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Add more formatting tests to sphinxtable testFriedemann Kleint2021-02-092-0/+69
| | | | | | | | | Add a test using programmatically constructed tables. Change-Id: I81ede76df045e730e27c102576d86a883e141a4e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit db824ef8c01b79a60c8029061eb5c86b51dd87fc) Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6/Documentation: Fix the TOC table to appearFriedemann Kleint2021-02-091-2/+0
| | | | | | | | | | Remove the indentation, which is throwing off sphinx. Task-number: PYSIDE-841 Change-Id: I865d9ea71c052d29ac8d1796918675cb9c17b87d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit f737b174b08f029bd8ae209d3ef24137317610a8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6/Documentation: Fix the extra sectionsFriedemann Kleint2021-02-091-11/+16
| | | | | | | | | | | | | | The file filter used for filtering the extra documents did not include the '.', so, the module description QtXmlPatterns.rst was added as an extra document for QtXml. Add the dot to the filter and sort the result. Use QDir::entryInfoList() since it is faster and gives the full path. Task-number: PYSIDE-841 Change-Id: I173979b9a527121b95bcb0190f603c02565bc282 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 2e43fc4cfd997de48eae352a8a42936f6e4b3785) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6/Documentation: Update the getting started page on doc buildFriedemann Kleint2021-02-091-1/+6
| | | | | | | | | | Mention ninja and how to re-run sphinx. Task-number: PYSIDE-841 Change-Id: Id169da66dcfd09640800da52661dbd842b74f15b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 13e63be261a89ed9c051028225d63a30b1f005af) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6/Documentation: Fix table width determinationFriedemann Kleint2021-02-081-3/+3
| | | | | | | | | | | Initialize the width/height lists to 0. As a drive-by, use the number of lines from splitting instead of counting. Change-Id: Ib17ed819684298599d3c01cf00cfc8b5c192d232 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit ad01b159e02067ba46d6433412cb1e690553e946) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6/TextStream: Fix the output of empty aligned fields for width=0Friedemann Kleint2021-02-082-1/+6
| | | | | | | | | Amends 44b03e3ded688aabe8352e8bda66df8677acc8a4. Change-Id: Iab4b9bfd991098fbae261cbe29a2caf13f7ebd3d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit eca89cd04469a61b3c9ee7993122ca1ec3fe976f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6/Documentation: Fix the sorting of classesFriedemann Kleint2021-02-081-5/+3
| | | | | | | | | | | Sort classes before writing the TOC. Apparently, the order was reversed by 7626f04ac855a56d4b364eac7b8350bdd561fef0. Change-Id: I76c6326df8bd6b182cf617901bb4c37a0f443897 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 95e3b2c7256c71b274be5f16e216116e5876ee87) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Fix missing images in documentationFriedemann Kleint2021-02-051-0/+1
| | | | | | | | | | The output path was not set to the sphinx parameters. Amends cddc4e975398c7c285b0dfada8a57fe997f05833. Change-Id: I35c5bf427f76792ff1b714f307bb6158bf4575a7 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit e18868bfbc588e63ff4d2e821c6bce1c7cbe4fb6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc: general update and add more informationCristian Maureira-Fredes2021-02-0428-251/+867
| | | | | | | | | | | | | | | | | | | | | | | | | | Updates: * Refreshing the information on installing and building PySide * Adding hyperlinks to some files * Including PySide installation GIF (from Wiki) * Modifying the CSS to improve the code snippets, :command: role, and adding layout for two columns. New tutorials * QTableWidget * QTreeWidget New documentation * Differences between Widgets and QML * IDE information (+ QtCreator GIF from Wiki) * When to use Shiboken * file types explanation * Summary on distributing applications Change-Id: I5195cc5a4af858bb7aad7891d14562ca07b6df23 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit a6c7e9d7fd65946762766e40793ba86291bcca1a) Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Bump version strings for next releaseSimo Fält2021-02-032-2/+2
| | | | | Change-Id: I3302d5e9fa42b64e60679c3c51ef5bb7aed1c55e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide6: Fix documentation warning in qmlsqlintegration.rstFriedemann Kleint2021-02-021-1/+1
| | | | | | | | | | Fix sources/pyside6/doc/tutorials/qmlsqlintegration/qmlsqlintegration.rst.rst:65: WARNING: line number spec is out of range(1-145): '130-146' Change-Id: I66b328f03fb69048defd1e1da1dfda8d8c309d96 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 4d7c6e0ac10dc49abb7e7d4ad07503449906f459) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Fix a crash when printing clang diagnosticsFriedemann Kleint2021-02-012-5/+18
| | | | | | | | | | | | | | The CXFile struct used in the Diagnostic struct representing a diagnostic message is invalid after clang parsing has finished and causes a crash when printing. Expand it to a QString at creation time. Apparently, this occurred with recent clang versions. Change-Id: I297014e272d6814f04e8f0273e8ae79ab8264138 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 9da07f8145b38f4483fed94fbc3148af872b08ec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* feature: Fix a flag error when no snake_case is selectedChristian Tismer2021-02-011-3/+4
| | | | | | | | | | | | This is another small bug that was found by testing true_property alone. Some flag refactoring forgot to mask the flag. Change-Id: Id3576cf982451b022a8ace72fbaf4369d32b6cb1 Task-number: PYSIDE-1019 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit cdb644bc8fde3086996d4ecaba06f8c34d7666a3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* feature: delete setter after creating property only if standardChristian Tismer2021-01-291-5/+9
| | | | | | | | | | | | | | | | | | | | Some features like QWidget.size are defined by Qt with a non-standard setter name. For size, the standard setter name would be setSize, and in the property creation process this setter would be deleted. We changed rules in this way: If a setter name is non-standard (like resize), the setter will not be removed but still can be used. Actually it would make more sense if "size" was a read-only property. Task-number: PYSIDE-1019 Change-Id: I9ded7e9c1dbd2932aa4c5616385b90ed673bfaee Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit e675a51ce48875800c1f9137cedd49144c62af58) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Do not attempt to qualify braces specified as default valuesFriedemann Kleint2021-01-261-1/+1
| | | | | | | | | | "Qt::WindowFlags flags = {}" was mistakenly changed to "Qt::WindowFlags flags = Qt::{}" Change-Id: Ic160a220db56645f0f554863c0a0d5e92b1307dd Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit d80794d374f6da0fc0ac11408d29417819b43045) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Add missing break statementsFriedemann Kleint2021-01-221-0/+2
| | | | | | | | | Fix an oversight of 6a1a08cfaf11ad38612e59cb1d56160160504ec8. Change-Id: Iba09b4c631132f7c50ab6b2321b9e93a61c26650 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit f4186986c9a68b9691f4c46c446cc13b1bc90606) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* signature: Provide fixes and improvements, Part 1Christian Tismer2021-01-228-35/+50
| | | | | | | | | | | | | | | | | | | | The signature module is modified again to be more correct when using the mypy application. This part splits some changes which occurred when working on Shiboken.Enum inheritance. There will be a number of follow-ups: - signatures for all shiboken types - test cases for signatures - signature support for different __feature__ selections Change-Id: Ifb0d92bf7641f2909ab950e3458b3c3c68c20dad Task-number: PYSIDE-510 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 123e27090e0ec4f8d32f301700c9ff9d1b49ba2a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Documentation: Fix creating inheritance diagramsFriedemann Kleint2021-01-221-1/+1
| | | | | | | | | Amends d9f344fcef6bec04a787f9ea9f4ea94f15eaa26c. Change-Id: I14a440c8372b5d0e418161c593bf9093f9010665 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 665f3b2ba6014575185d9209229df35d2d5b9798) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* allow to use shiboken.delete() to delete Q*ApplicationChristian Tismer2021-01-117-9/+46
| | | | | | | | | | | | | | | | | | | | This function should initially not allow deleting Q*Application with a shiboken.delete() function, but unfortunately some competitor can do that, so we will as well. Deletion of qApp needs knowledge about qApp. We add a hook function that calls the pyside function `destroyQCoreApplication`. A special problem was testing interactively. See the error description for the days long journey :) Change-Id: I34862425c2cb2cc80d6cafc22d25a867f96f3e0a Fixes: PYSIDE-1470 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 98aba46414b666c27df3904d2b4313f0a16e05dc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide: write a renamer script for debuggingChristian Tismer2021-01-111-196/+0
| | | | | | | | | | | | | | | Debug output is hard to read if there are many objects with the same type but different address. This script builds simple names instead of addresses which are easy to track. See the info at the beginning of the script. Change-Id: I51e08276d8ffc6d7365ce8620957e64769d7fd8c Task-number: PYSIDE-79 Task-number: PYSIDE-1470 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 8a115fcc3719af509a1abb91805729c06ce38443) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken2: Add diagnostic output to clang include searchFriedemann Kleint2021-01-111-1/+6
| | | | | | | Change-Id: I6c1063cf94ec790ad34d8edaee8d524b8fb28ed8 Reviewed-by: Simo Fält <simo.falt@qt.io> (cherry picked from commit ab616250020a1c7a16b058f1041618758a6406ee) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* sources: migration from format() to f-stringsCristian Maureira-Fredes2021-01-0658-146/+146
| | | | | | | | | | This should be the last patch related the usage of f-strings from the 'sources' directory. Change-Id: I0288d720dc4930dee088ca3396a66d1b3ba18f76 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit d9f344fcef6bec04a787f9ea9f4ea94f15eaa26c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* feature: Disable selection while creating a typeChristian Tismer2021-01-065-4/+24
| | | | | | | | | | | | | | | | | | | PySide 6 suddenly has problems with feature switching during subtype initialization. We introduce an enable function that can temporarily suppress switching. This problem is solved so far. It is the question whether this will break again in another constellation. It might be considerable for the future to have something like Python's PyType_Ready function. Right now this is too much effort. Change-Id: If0ed786d4761cf2356f01f7478e4a0d750e88d3c Fixes: PYSIDE-1463 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit b6d1b76b46d7b756f7cb01361037e1cb5efc990a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Guard against repeated invocation of the module init functionFriedemann Kleint2021-01-051-1/+6
| | | | | | | | | | | | It cannot entirely be avoided in the case of the scriptable application example. Generate code checking on the global variable. Task-number: PYSIDE-487 Change-Id: I12bcd9df37c39f78f1d7edc63e16b3c6a9525011 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 50a30e50ba5edd2cdeefe3118e0a0f7e79e3732f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QSetting.value add overload documentationCristián Maureira-Fredes2021-01-051-0/+21
| | | | | | | | | | | | | | | When the new overload to specify a new "type" parameter was included, there was no documentation that could be reflected in our API docs. This adds a paragraph/example for the overload introduced by 78dad8180d797a647645b74255bfc29c46d7264a Fixes: PYSIDE-1466 Change-Id: I843e650f8eb4c32f4c67a31ed5cf9047c4f171f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 9547dc918868470fe00fafe25d74a87b2ed35f1f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc/tests: update old style printCristian Maureira-Fredes2021-01-0434-88/+88
| | | | | | | | | | There were some leftovers from Python 2 still around our code, this patch only covers the 'print' cases. Change-Id: Icf574be6a40cdb233d3c410c2ec831d2d09bb735 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit b3a8c9898cca52b63d270a54651ec71de9b32238) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* basewrapper: clear all traces of special Q*Application treatmentChristian Tismer2021-01-049-189/+49
| | | | | | | | | | | | | | | | | | | After simplifying qApp so much, it is no longer necessary to treat Q*Application special. We now can allow garbage collection for all objects which simplifies the code quite much. Then it was easy to shrink the implementation to a single function `MakeQAppWrapper`, which made the whole "qapp_macro" files no longer necessary. This cosmetic change will probably not be back-ported to 5.15 . Task-number: PYSIDE-1447 Change-Id: I8ae3c5575e62bd7b5d6bac65c25775c712bb178f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 8998f9c1a9116151b679c61ad36fedcc74cc75a1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qApp: fix flag handling in Python 3.8+ and a Python 3.9 issueChristian Tismer2021-01-042-15/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an old problem that was solved for Python 2.7. From Python 3.8 on, the behavior is the same with Python 3. The fix finally was to extend a Python 2.7 patch to Python 3 as well. See the Jira issue for details. Other little changes: This patch includes also a small patch that was mentioned as necessary for Python 3.9: Python issue 40217. I have seen no effect of this change yet but applied the patch, anyway. When searching for a solution of this problem, a lot of time was spent debugging qapp_macro.cpp, although it was error-free. As a side effect for better understanding, the variables were renamed to more common style. These more independent changes could have got their own check-in, but the complication of a pick-to and the small code size wasn't worth the effort. Change-Id: I7638f1a711315b4678af6b7389265b905c6404a1 Fixes: PYSIDE-1447 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit c1f776570adbe4f9aa21aa818a82f5ebd1258a76) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Remove misleading doc snippets about QSpinBox signalsFriedemann Kleint2021-01-011-30/+1
| | | | | | | | | | | | The doc snippets were apparently meant to demonstrate how to disambiguate overloaded signals by specifying the type in angular brackets. It no longer applies since the signals were disambiguated in Qt 6. Change-Id: Ie696a40a07319118555fcbf1b092f761dd07befa Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 2de27981d6bf21783da56f62a1458227aa793104) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* signature: Fix infinite loop changing up directoriesFriedemann Kleint2021-01-011-2/+5
| | | | | | | | | | Break out of the loop when dirname() returns the identical string. Fixes: PYSIDE-1460 Change-Id: I31a53946bb302758acb196f47a9ad605edfdd667 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 131a1c17eed13171bf09ba42b2205760580e4f24) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: De-virtualize TypeEntry::targetLangApiName()Friedemann Kleint2020-12-232-58/+16
| | | | | | | | | | | | It is only used for the "target" attribute of PrimitiveTypeEntry, all other overridden methods return some Java-ish name. Make it a settable property and remove the overridden methods. Change-Id: I34dd3c7a2cb3ea4f6968dc8c8d1a70aad9fbf5ed Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 7819758c3e259b59786abdcdb4051ce2024ede3a) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken6: Consolidate type name utility headersFriedemann Kleint2020-12-226-49/+48
| | | | | | | | | - Rename CPython types to cPy* - Use them where applicable Change-Id: Iea05f7d7de5402b9de6d8a614da899b0b67811dc Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 0e055a163c8b81b74ea90180f910827f507fe10e)
* shiboken6/ApiExtractorResult: Use const AbstractMetaClass * for the class listFriedemann Kleint2020-12-2211-20/+51
| | | | | | | | | | | Add the missing overloads of AbstractMetaClass::findClass() and adapt some types. Change-Id: I65851248b4b6a2e1d4f57fc58ecaf75fb4c00b29 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 6d25758babd8ccad4fbc7effe561c29cbd692434) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Introduce class ApiExtractorResultFriedemann Kleint2020-12-2219-243/+353
| | | | | | | | | | | | | | | Separate the generators from ApiExtractor by introducing a class ApiExtractorResult storing the results of an ApiExtractor run. Move some query functions there. With that, some generator functions can already be made static by passing the ApiExtractorResult and OverloadData can be decoupled from the generator. Change-Id: Iaba3ebff4aecb722eec4a606423738260983d905 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit b9286bd08a4e7bf8f603e274c80cbd86cb9c1a4a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Remove obsolete enumeration QPagedPaintDevice::PageSizeFriedemann Kleint2020-12-221-1/+0
| | | | | | | Change-Id: Iccef8a419cb710ffe0ba7bb2febeb2302fa5ceef Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit f390df8f323a3a207ebbcedabd9c51c0e575e63f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Move API for primitive/container types to generatorFriedemann Kleint2020-12-224-18/+6
| | | | | | | Change-Id: I53f4b9634568a5626d972e50cc67f4bec8fe92fc Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit eac11718bd7fe346fbc65e922e3a0222613ff4a9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Do not sort classes unnecessarilyFriedemann Kleint2020-12-218-69/+33
| | | | | | | | | | | | | | | | | | | | The list of classes was first sorted topologically, then alphabetically in the AbstractMetaBuilder and finally again topologically in the CppGenerator with an additional dependency QObiect/QMetaObject. Move the sort functionality taking the QObiect/QMetaObject dependency into account from the generator to the AbstractMetaBuilder. Move all sorting functionality to helper sortLists(). The classesTopologicalSorted() helper is then no longer needed by the generators and can be removed from the ApiExtractor. Change-Id: I03c799118296393bdd0f3de84427b50ab29153b0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 638bc0e5e8f0400411c6ba0fb40ddcde6d3a7c40) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Refactor base class retrievalFriedemann Kleint2020-12-216-17/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | AbstractMetaClass has a list of base class names and a list of AbstractMetaClass* base instances. AbstractMetaBuilder populates the instance list from the names in setupInheritance() and sets a flag. In a few places in AbstractMetaBuilder, the base class instances are needed before this has been completed. For this purpose, the helper AbstractMetaBuilder::getBaseClasses() is needed. Replace the set of classes m_setupInheritanceDone by a flag on AbstractMetaClass. This allows for adding an assert to AbstractMetaClass::baseClasses() ensuring setupInheritance() has been called and taking a shortcut in AbstractMetaBuilder::getBaseClasses(). In addition, classesTopologicalSorted() can use AbstractMetaClass::baseClasses() instead of searching with AbstractMetaBuilder::getBaseClasses() and can thus be made static. Change-Id: Iaf8209b6f6534ad91a96970a56c1e86cce054922 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit e99ac18b134469854dff05fd3bb61158f9d9ccf9) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken6: Rewite the graph sorterFriedemann Kleint2020-12-217-395/+430
| | | | | | | | | | | | | | | | | | | | | Change the Graph used for dependency sorting from a graph using integer node numbers to a template taking the Node value, relying on operator==() (and its qDebug() operators). The mapping of node to indexes can then be removed from the client code, leading to a significant simplification. As a side effect, this fixes undefined behavior of the overload sorter in conjunction with reverse binary operators. It was not handling overloads of the same decisor argument type correctly, leading to graphs with duplicated node types for them. Rewrite the toposort test to be data driven. Change-Id: Idbe896dc81d7272099db6dab3d2673643fc17401 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 7626f04ac855a56d4b364eac7b8350bdd561fef0)
* shiboken6: Refactor the class find algorithmFriedemann Kleint2020-12-201-18/+29
| | | | | | | | | | | | | Search for target lang name if there is a dot present and do not search for unqualified names if there is a "::" in the name. Use iterators to prepare for the use of different container types. Change-Id: I4722cfacb4173c84035038c667ec1aaeb049c713 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 3139c8dddf9dfb0e935cd03b3d539541fdf0edf0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>