aboutsummaryrefslogtreecommitdiffstats
path: root/sources
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup version strings for 6.0.1 releasev6.0.16.0.1Simo Fält2021-02-032-6/+6
| | | | | Change-Id: I1d4b59540686c19e676fde0db62b670e34ecc096 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@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>
* PySide6: Remove rejection of namespace stdFriedemann Kleint2020-12-181-1/+0
| | | | | | | | | | | It prevents usage of std::shared_ptr in combination with Qt bindings. Task-number: PYSIDE-454 Change-Id: Ie893a37d1482f12692a0198f9058c887cfa823a9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 9f7741c021e7fb06c3c4f2a1782594951362940f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Fix support of multiple smart pointer typesFriedemann Kleint2020-12-181-11/+12
| | | | | | | | | | | | | | | The function searching for the instantiations of smart pointers was not checking for the smart pointer type entry, so, QSharedPointer<int> was hiding std::shared_ptr<int>. Check for the type entry as well. Rearrange the code a bit. Task-numnber: PYSIDE-454 Change-Id: Ib7a0385ce2c0f8de84b644168b0164f13f3332ad Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 069f7309d72b2a1f80638641ac3d6269b6aefc1d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Add QTestlib's QAbstractItemModelTesterFriedemann Kleint2020-12-182-0/+5
| | | | | | | | Task-number: PYSIDE-1449 Change-Id: I47eab35af461ae8b3bd6fffbb6b882bb0c74d186 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 28ff3f8edc873a993b8f83b1c7789ce17c2778ed) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Fix code injected at target/end being invoked for several ↵Friedemann Kleint2020-12-171-1/+1
| | | | | | | | | | | | | overload ids Insert the missing break; statement into the switch on overload id. Fixes: PYSIDE-1448 Change-Id: I1990c7fbf66e9945c520759b40b8dfb4453a5dd8 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 66e438fa82cd9a5c3de419439271c7b0777082cf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Adapt to recent changes on Qt 6Friedemann Kleint2020-12-171-2/+1
| | | | | | | | | | | | - Adapt QPersistentModelIndex to qtbase/6bc1a1ec2f630d38d87ff14c8ab4c3fa5eba35be - Remove QList method from QXmlStreamAttributes which is no longer found. Change-Id: I81c7b825b4a6028292b672476908c4317191580d Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 868b3cce85dd07149be5dd416c71d3c700a4f4dc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Fix building of Qt 3DFriedemann Kleint2020-12-172-4/+3
| | | | | | | | | | | | | Remove QAbstractFrontEndNodeManager, adapting to qt3d/569d0d030610269a47fe7fec9a3f4248b8d8bdea. Reject Qt enum helper functions in Qt3D namespaces. Fixes: PYSIDE-1450 Change-Id: I238010f214a6c59ac6e53dcf02d5c52c1ec51aae Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit c25840f139aeff565808d37cec07cefb60607474) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* write a leak_finder scriptChristian Tismer2020-12-171-0/+196
| | | | | | | | | | | | | | | | | PySide has a few known memory leaks and probably some unknown leaks as well. There are more or less unproblematic pseudo-leaks where only too many references are kept, but there are also the true leaks, where new objects are created all the time. This script is a first attempt to get rid of that problem. The interface is not perfect but works pretty well. Change-Id: I8e44eedde036f25adadf66ca2a7fdac8095619c4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 089d527e5a331ab83c9b365314301c39382c5b45) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* signature: Fix the parser regex for Qt6Christian Tismer2020-12-162-14/+17
| | | | | | | | | | | | | | | Our parser regex handled everything but no single quotes. In Qt6, single quotes appeared with a backslash escape. Errors will no longer give a warning but raise a SystemError from now on, because syntax errors in the parser are not tolerable. Task-number: PYSIDE-510 Change-Id: I6790d4aa73b507160b0c3107c2aa665fe6aae49d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit be04c2df4202bcf2086348380da91fcfb28397d6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Reactivate sphinxtable testFriedemann Kleint2020-12-154-90/+140
| | | | | | | | | | | | | | | | Rename the test to qtxmltosphinx, move it into its own subdirectory and rewrite it as a data-driven test. Skip one failing test. It can be extended in the future to test other functionality of QtXmlToSphinx. Change-Id: Ib732e659952e39a37d7e5b556a951cecbee248be Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit d1afee4a0a7f89f0b9628322d8d68035c363c0b1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* remove QBackingStore from qrasterwindow_test.pyChristian Tismer2020-12-151-26/+2
| | | | | | | | | | | The QBackingStore part of qrasterwindow_test.py does not work on macOS. We remove this part of the test that should not even reside in PySide but is a Qt matter. Change-Id: I520a5fd1336850d3e3883bcccb9b6a4b2cdafeda Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 35f0aa7be658c6dc5887aad6c38e098e3466ec5f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Shiboken6: Decouple QtXmlToSphinx from the doc generatorFriedemann Kleint2020-12-157-210/+289
| | | | | | | | | | | | | | To enable testing, decouple QtXmlToSphinx from the doc generator by introducing a parameter struct QtXmlToSphinxParameters and an interface QtXmlToSphinxDocGeneratorInterface. Move the messages back into qtxmltosphinx.cpp and move the helper function convertToRst to the doc generator since it uses FileOut. Change-Id: I176888dcbd65003856ea8797a5629949598801d5 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit cddc4e975398c7c285b0dfada8a57fe997f05833) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Porting Guide: Mention classes that were movedFriedemann Kleint2020-12-151-0/+4
| | | | | | | | | Amends 592a716369d2cdacb423b8abc29045b1d1535991. Change-Id: I73c6ab49e157d16bc9e3532e33d2ec05ba541682 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 3a02acaceb36e2de4b5c61e1b607850630c82c9c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Use QScopedPointer for the doc parser in QtDocGeneratorFriedemann Kleint2020-12-152-9/+7
| | | | | | | Change-Id: I0dbf8ac3b5cd7c6135ac6a4564a6cfe288c327b7 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit b18e4576ee297b956331f8de189f87c5a9d497b8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Clarify code comment about pointer operatorFriedemann Kleint2020-12-151-4/+3
| | | | | | | Change-Id: I395d87a75abe0c744369e6d3e31fff990c620e7b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit a903d1b6c8c5e320628e333496d6a536a89c3a4f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Determine function types in the code modelFriedemann Kleint2020-12-1111-191/+348
| | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the _FunctionModelItem function type enumeration by operator types and determine them by name or from clang. Split the bitwise operators into shift and other bitwise operators for stresm operator detection. Similarly, add operator type values to AbstractMetaFunction::FunctionType and replace the isOperator() checks accordingly. Remove the unused isOtherOperator() function. Rename AbstractMetaFunction::isNormal() to needsReturnType() for clarity. Rewrite the binary operator search in AbstractMetaBuilder by checks based on enumeration value and rewrite traverseOperatorFunction to return a bool so that shift operators are found when stream operator is not applicable. Rewrite the function query functions of AbstractMetaClass to also use the enumeration values. Change-Id: I06cc2deefcd8a158f83c95513a7962de467f7f2a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 6a1a08cfaf11ad38612e59cb1d56160160504ec8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move QKeyCombination from QtGui to QtCoreFriedemann Kleint2020-12-114-2/+3
| | | | | | | | | | | It was mistakenly added to QtGui, but it lives in QtCore. Change-Id: I398eb9735b4a4d6e570b054d288b1ef7ffa0478d Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 6ccb3f64575696c8327aeb7c12f8f0ff99bdecf0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Fix enumeration/flag reference parametersFriedemann Kleint2020-12-101-4/+8
| | | | | | | | | | | | | | For functions like QDataStream &operator>>(QDataStream &, [enum] QCborSimpleType &), the QCborSimpleType argument was treated like an object. Add a check to treat it like a value. Change-Id: Ic2bb8a806b7fe941d8eab3543f21afa0577dd1a0 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 14c4883b7996a8835950d7122079a1bd7f07dda1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Fold MetaFunction::isCastOperator() into isConversionOperator()Friedemann Kleint2020-12-105-13/+7
| | | | | | | | | | | | | They are basically the same thing. The complicated regular expression in isConversionOperator() apparently dates back to the old C++ parser; with clang's canonical function names, a check for startsWith("operator ") is sufficient. Change-Id: Ife948695619d36904d124e204bc91490704fd4bf Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 0b1fe169232252c506104003a09f0e5c01085909) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Remove function type enumeration value GlobalScopeFunctionFriedemann Kleint2020-12-103-5/+7
| | | | | | | | | | It has no use since member functions and global functions are stored in separate lists anyways. Change-Id: Ib64f53f7f043ea70f7e995d14515385dfb9fbc03 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 48fbcdd4da141c639daafa8b92d42ab12a3af66f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>