aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Enable 5.15.2.1 fix releasev5.15.2.15.15.2Simo Fält2022-01-077-7/+7
| | | | | | | | | | | Update qt5 dependency Disable not needed platform configurations Update virtualenv version Update wheel names Disable test asserting patch level version being int Change-Id: I4215deb96c69f43bc4bfc458ed20f1254f4383e2 Reviewed-by: Simo Fält <simo.falt@qt.io>
* Fix cmake argument for standalone macOSCristian Maureira-Fredes2022-01-071-1/+1
| | | | | | | | | | | | | | | The command --build doesn't properly work when trying to do a standalone invocation, and complains that it's an unknown argument, since that's meant to invoke a build with ninja, make, etc, and not to get information related the path of libraries, -B should be used instead. Fixes: PYSIDE-1556 Change-Id: I4e64477032beba75c1210cb29093465f1c85bb6c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 58ac9b4ca4e67db1480c03f3fc84948d2dcb793f) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* py3.10-prep: Fix parser.py for changed typing moduleChristian Tismer2022-01-072-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The typing module has subtle changes that are not even documented: Typing types now have a __name__ attribute. That confused the parser of the pyi generator because suddenly stingizing Callable[..., Optional[str]] resulted in Callable[..., Optional] because of special rules that return the generic name of a typing type, which was very unexpected. Finding this bug took a lot of debugging of the recursive `_resolve_type` function. We finally move the debugging_aid string as a function into lib/tool.py, because this was very helpful. [ChangeLog][shiboken6] The parser for .pyi files needed an update because of undocumented changes in typing.py for Python 3.10 . Task-number: PYSIDE-1436 Change-Id: I3b8f2c1aa52a23014a8a915a0c677af96dfc536f Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 2530cb3f165ac02b8f7132e3f5ab4f7f6896dbd9) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Python 3.10: add wheel identifierCristián Maureira-Fredes2022-01-072-2/+2
| | | | | | | Change-Id: I97b323d5055c30f782f62b85e734eb9f0e33f7b3 Reviewed-by: Simo Fält <simo.falt@qt.io> (cherry picked from commit 2fb82b5cd3ee1db9234e038759bd0e3cda9ca40b) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* py3.10-prep: Fix a very old refcounting error in time_test.pyChristian Tismer2022-01-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 2012-03-08, there was a refcounting error in the typesystem_sample.xml file at <value-type name="Time">. The boolean function results were not refcounted. (Commit 7b731d702c64d172e192aa1876e4a6fade6c38d7) This bug was hard to find because nobody expects a failure in the testing code, and the error shows up at the very end in the finalization code, totally unrelated to the error location. In order to find it, the setting `PYTHONMALLOC=malloc` was needed, because otherwise we got a Python memory dump but no traceback. Then, Python was modified and code was inserted in the various involved `code_dealloc`, `tupledealloc` and `object_dealloc` functions that printed the involved refcounts and types before performing the actual deallocation. This bug actually was of no harm since only the wrong test was involved. It was very misleading because there were quite some changes to the `datetime` module in Python 3.10 . But the bug was nothing but a dormant refcounting error. [ChangeLog][shiboken6] A very old refcounting bug from 2012 in the sample XML lead to a crash in Python 3.10 . This bug was found because the refcounting of Python is more exact, now. Task-number: PYSIDE-1436 Change-Id: I4363aae48e23f8ccdbd85c30654a44edbd69e516 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 2af6ac20de365116b52b65c6c34cfd6c536c23df) Reviewed-by: Christian Tismer <tismer@stackless.com>
* py3.10-prep: Fix a binary operator bug in cppgenerator.pyChristian Tismer2022-01-071-0/+3
| | | | | | | | | | | | | | | | | | | The cppgenerator produced on binary flag operators only checks for cppArg but not for cppSelf. This is wrong, because arguments are sometimes swapped on operator calls. This was recognized in a debug Python build on Python 3.10 . The error checking of this version has a lot improved. [ChangeLog][shiboken6] Binary flags operators did check cppArg only, but not cppSelf. This is necessary when arguments are swapped. Recognized on Python 3.10 due to improved error checks in debug mode. Task-number: PYSIDE-1436 Change-Id: If14e295e6a5a55a6b648c711b7a934733858636a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 7034d2ff83248cf9f1a959fdeabf47e5d20c8df8) Reviewed-by: Christian Tismer <tismer@stackless.com>
* py3.10-prep: Finally support Python 3.10Christian Tismer2022-01-077-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | After the major problems are solved in py3.10-prep: re-implement zip import py3.10-prep: reset the type cache after feature switching py3.10-prep: Fix parser.py for changed typing module , there are only some minor changes left to do. One thing is still not clear: * Unsolved: In time_test.py, the last two tests work but crash at shutdown. It is not yet clear if this is a PySide or Python error. This will crash Python 3.10 if not solved until the release. [ChangeLog][PySide6] Support Python 3.10. This is by 99% solved. Looking for a crash with unknown origin. Fixes: PYSIDE-1436 Change-Id: I94cffa7ed16a2651e09924fe5babc188b1b4c2b8 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 81e9cff884d6b03cdf64a5dd6ec6564d99177e0c) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* py3.10-prep: reset the type cache after feature switchingChristian Tismer2022-01-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][PySide6] Feature switching needs to reset the internal type cache. This was an omittion that becomes relevant in Python 3.10 . When using feature switching in Python 3.10, there were funny effects where switched and un-switched versions appeared to co-exist. It turned out that we were hit by function caching that is now implemented for the LOAD_ATTR opcode. It was not known that caching would happen at all for PySide classes because we don't use Py_TPFLAGS_VALID_VERSION_TAG. But actually, this flag is used internally by Python to do some optimizations, and we just have to notify the interpreter of type changes by PyType_Modified(). Task-number: PYSIDE-1436 Change-Id: Ie8a73f62bd6e9b8156b8ea23626fabd44700158b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 3a2b7c6f88bba04d8b7ddb571163d23c15c36a4f) Reviewed-by: Christian Tismer <tismer@stackless.com>
* setup.py: Fix 'clean' commandFriedemann Kleint2020-11-241-1/+6
| | | | | | | | | | | | Do not add -reuse-build, which it cannot handle. Amends ff5a96c49e2aa5347c1c9892aad33c591e931639. Task-number: PYSIDE-807 Change-Id: I96ab03b95dd7762b1a16f2acc5d8ca31555ef1a3 Reviewed-by: Alexander Volkov <avolkov@astralinux.ru> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 0a00958b083008dea340ef78b0f235ca49b7d22c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Cleanup version strings for 5.15.2 releasev5.15.2Simo Fält2020-11-122-6/+6
| | | | | | Change-Id: I7329fe88ed77e705c57a4991655600942471f6ae Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* build scripts: Fix warning about import orderFriedemann Kleint2020-11-092-10/+8
| | | | | | | | | | | Import Setuptools before Distutils, fixing: distutils_patch.py:25: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first. Change-Id: Ibbc1a5cd1d348f6f44f7e80a3ba7e9a7341fae8e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit b70183a78ed7a478ae9f2af19bd84535a8e69320) Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add changelog for 5.15.2Friedemann Kleint2020-11-091-0/+70
| | | | | | | Change-Id: I19aa4cb70be3d96aac9dbe74dad5adc4280fe6d1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit ce954a1cec8e7cd44cdad09bcda8f9f6d9aaa83d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use qt5#5.15.2 as a dependency instead of default 5.15Simo Fält2020-11-091-0/+3
| | | | | | | | 5.15 has MSVC 2019 to version 16.7.5, which seems to cause some issues. Change-Id: I49284133c83b1f6bdd8df64109f966e0226be12b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix QAxBase::dynamicCall(const char *, QVariantList)Friedemann Kleint2020-11-041-1/+7
| | | | | | | | | | | | | | | | When invoking QAxBase::dynamicCall(const char *, QVariantList), the overload taking single QVariants QAxBase::dynamicCall(const char *, QVariant1, QVariant2,...) was chosen by the overload decisor since QVariantList can be converted to QVariant. Specify the order manually. Remove the internal protected function. Fixes: PYSIDE-1410 Change-Id: I1bcffd34486d5ceebdeea3af47f42398896e9575 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 27aa24e589ca293298f88f3fd0d027d9f95dedc5)
* Pin windows numpy package to 1.19.3Simo Fält2020-11-043-1/+11
| | | | | | | | | Numpy-1.19.4 doesn't work with 'Windows Update 2004' Change-Id: I7fa388a4fa1d790eacd6da7b9fb34f37d1d455e8 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>
* pysideproperty.cpp: Fix warning about offsetofFriedemann Kleint2020-10-261-13/+15
| | | | | | | | | | Return the functions directly, fixing (g++ 9.3.0): sources/pyside2/libpyside/pysideproperty.cpp:331:42: warning: offsetof within non-standard-layout type ‘PySidePropertyPrivate’ is conditionally-supported [-Winvalid-offsetof] Change-Id: I98f57d05c4c4163e06431c579537b4db01c656e6 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 23c1001c79af9cbb3cd2d8a301e2e315b1f833b2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove wheel.pep425tags importsCristian Maureira-Fredes2020-10-262-19/+20
| | | | | | | | | | | | The import was removed starting from v0.35 in favor of the packaging module and other functions that are not placed in 'bdist_wheel'. Fixes: PYSIDE-1385 Change-Id: I97f5dbf9867f779a897d9041489831255ea54b67 Reviewed-by: Simo Fält <simo.falt@qt.io> (cherry picked from commit 56c37b3b95968b24bfb737698c0a4ca94d0b8802) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update SmartPointers conversionsRenato Araujo Oliveira Filho2020-10-214-4/+113
| | | | | | | | | | | | | * Updated test to accept base types derived using std::shared_ptr; * Generate new coode to be able to convert smart pointers into shared pointers of base class. Functions that accepts SharedPointer<A> as argument should be able to accept SharedPointer<B> if B is derived from A. Task-number: PYSIDE-1397 Change-Id: I7e5235980daaf4651dad3ab1c880373f1c64e134 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add some missing enumerations and classesFriedemann Kleint2020-10-215-1/+8
| | | | | | Task-number: PYSIDE-487 Change-Id: Ic5d15d67b821eff5cb59727ce2d749e6aa848441 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix SmartPointer conversion name registerRenato Araujo Oliveira Filho2020-10-211-11/+30
| | | | | | | Register the correct name for smart pointers. Change-Id: If12701901319b0578602ff5b5ab8eecad820d969 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken2: Fix one more instance of an invalid metatype passed aroundFriedemann Kleint2020-10-211-1/+3
| | | | | | | Add the missing call to decideUsagePattern(). Change-Id: Ibfe07afa3f830cefc953b8702aeca57e2b615f36 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* doc: update versions and comandsCristian Maureira-Fredes2020-10-2110-184/+243
| | | | | | | | | | | | | | | | | * add new way of building rst-only documentation * Updating recommended libclang for 5.15 * recommending python 3.5+ * link commercial license * Show videos as grid * changing title of a tutorial to be more specific * add missing step to build only shiboken * add venv as an option before virtualenv * add problem on windows and python 3.8.0 * add section to create a virtual environment * only show titles of tutorials to avoid having a long page Change-Id: Iebb99d2cd776c3d5b72dc44153f325f74a1626cc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Extend SharedPtr API with std::shared_ptrRenato Araujo Oliveira Filho2020-10-202-49/+26
| | | | | | | | | | | Make sure that we have copy constructor for SharedPtr with derived types. This will be necessary for test SharedPtr implicit conversions. Task-number: PYSIDE-1397 Change-Id: Ic970c84bef025403a0fbef79dce97433254d2f56 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken2/ApiExtractor tests: Avoid detaching of listsFriedemann Kleint2020-10-2022-132/+152
| | | | | | | Use constFirst/Last() instead of first()/last(). Change-Id: I3e7c72e3ab72b86565eea087b470f2a51b2999f8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken2: Fix testnumericaltypedef failing with Qt 6Friedemann Kleint2020-10-201-6/+6
| | | | | | | | | The test uses "ushort" as a type name, which is apparently pulled from some header with increased language level. Use a real custom name to circumvent this. Change-Id: I6f3ba16d8f25f5b12edcfd53b1397de9f7c1d583 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken2: Fix an assert crash in debug modeFriedemann Kleint2020-10-201-3/+0
| | | | | | | | | | Do not consider RValue-references as invalid types; this causes an assert crash by 556c13f39244b4eb75638cd8f4434167eadf0c98. They are filtered out later. Change-Id: I6c477bb8319aa99ad73ff9a002ec11992a9ac538 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken2: Ensure there are no AbstractMetaType with Invalid usageFriedemann Kleint2020-10-203-4/+14
| | | | | | | | | | Introduce new values for the pattern enum representing template parameters, which were previously invalid and add a missing call to decideUsagePattern(). Change-Id: I7edeb80a67ab1edfe895e96311d54c9128fad5a3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add some more classes from QtConcurrentFriedemann Kleint2020-10-165-0/+44
| | | | | | | | | This lays the foundation for adding further specializations of QFuture and QFutureWatcher to dependent modules. Task-number: PYSIDE-1202 Change-Id: I82f9940db9d50ced95d4e1388c6460c6efc0469b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* build_rst_docs: add DistUtilsCommandMixin to the commandCristian Maureira-Fredes2020-10-151-3/+4
| | | | | | Task-number: PYSIDE-807 Change-Id: Ib2369887bafc61971ffa500427ec85c1cd73c2b2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Enable typesystem typedefs across modulesFriedemann Kleint2020-10-1511-9/+212
| | | | | | | | | | | | | | | | | | | Adding a specialization of template type ValueWithUnit from libsample to libother would fail since the SBK index array of libsample would be used with the index from libother for it. Build up the inheritance for typesystem typedefs early on and add a lookup which matches the template specializations found during traversing functions to the type def and the class that is generated for it so that it can be used. As a side effect, special case entries for template specializations can be deleted from the signature mappings since they change to the class name and thus are normal types. Task-number: PYSIDE-1202 Change-Id: I5cc9650f70e9dc975171c80919685ebf5e752749 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken2: Enable setting up inheritance for templates early onFriedemann Kleint2020-10-152-17/+25
| | | | | | | | | | | Split the code adding the specialized template functions from AbstractMetaBuilderPrivate::inheritTemplate() into a separate function. The part setting up the base classes can then be called at an earlier stage so that it is known when traversing the functions. Task-number: PYSIDE-1202 Change-Id: I958d357b78572c9b5130dbe1bf517d2af82a6f1a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add a test for typesystem typedefsFriedemann Kleint2020-10-157-0/+161
| | | | | | | | | Mimicks some template which might be used trying to enforce correctness of units by type checking. Task-number: PYSIDE-725 Change-Id: Ia7008d7db5638920eee3d0ef36cc32a63796b98e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken2: Find all template classes for added functionsFriedemann Kleint2020-10-141-3/+11
| | | | | | Task-number: PYSIDE-1202 Change-Id: I7039b113ffd43289f96f890ca55cb5b9b4607c92 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken2: Some RefactoringsFriedemann Kleint2020-10-147-62/+37
| | | | | | | | | | | | | - AbstractMetaType: Pass TypeEntry to constructor - AbstractMetaType: Return instantiations() by const ref - AbstractMetaClass: Make baseTemplateInstantiations a member instead of a global hash. Simplify the code accordingly. Task-number: PYSIDE-1202 Change-Id: I1a18aa4ff97481af8cb13e8732fe3952c48edb29 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix wheel_override error when wheel not availableCristian Maureira-Fredes2020-10-141-8/+9
| | | | | | | | | | | | | Since the try failed, there was no option to import DistUtilsCommandMixin and then a: NameError: name 'DistUtilsCommandMixin' is not defined and AttributeError: type object 'type' has no attribute 'user_options' was raised. Task-number: PYSIDE-807 Change-Id: If5aa37ce9928a5c029b21decc24bd2bccf9b4dc4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* setup.py: Show options in command helpFriedemann Kleint2020-10-144-107/+216
| | | | | | | | | | | | Move some options to a command mixin. This cannot be done for all options since some determine the package name and need to be known at before instantiating the commands. Print an additional help text listing them. Fixes: PYSIDE-807 Change-Id: I43adb09db16f74af037bfb754cad2c0f5cfe43be Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken2: Use an AbstractMetaType for "void"Friedemann Kleint2020-10-139-79/+89
| | | | | | | | | | | | | | Previously, nullptr for an AbstractMetaType meant "void", particularly for function return types. The problem with this is that it causes unexpected crashes when dealing with template types like QFuture<void> due to one of the instantiations of the AbstractMetaType being nullptr. Use an AbstractMetaType based on the existing "void" type entry for this. Task-number: PYSIDE-1202 Change-Id: Ib06035cc7903480fd509f7e927d9114c55d51b62 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* shiboken2: Improve debug output of type entriesFriedemann Kleint2020-10-131-3/+12
| | | | | | | | | | | Don't output the generateCode field in hex after 4761ea81d1789d153ae986be6f749853f5a68332. Output typedef entries of type database. Task-number: PYSIDE-725 Task-number: PYSIDE-1202 Change-Id: Ib194eceedf2764a9c23353f4a833cb1e57a6e359 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* property_python_test.py: Restrict exceptFriedemann Kleint2020-10-131-1/+1
| | | | | | | | | Catch ImportError when trying to import support from test. Amends d3883e9186892e673e8a66ad6651409d5eaf7cf3. Task-number: PYSIDE-1402 Change-Id: I9fc77f6311596f1e52872d5ffbb491e01c207b73 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Update QtCore.Property to the current standardChristian Tismer2020-10-125-53/+410
| | | | | | | | | | | | | | | | | | | WAS: Feature-select: Use QtCore.Property instead of Python's property When successfully trying to use QtCore.Property for feature-select's property, I suddenly realized that the implementation only works with QtCore derived classes. This is the reworked version of Property that behaves correctly. The exhaustive Python test was adapted and is used to check the full compatibility of this implementation. In a later update, this implementation might be changed to no longer be restricted to QObject. Change-Id: If87b7b633a2c45e23a15c4d956f63e21d33af3dd Task-number: PYSIDE-1402 Reviewed-by: Christian Tismer <tismer@stackless.com>
* feature_select: finish properties and postpone static propertiesChristian Tismer2020-10-093-4/+80
| | | | | | | | | | | | | | | | Static properties are not easy to support. They need an extra property subtype and support in the meta-class. A problem is that the implementation needs to go deeply into the innards of things and need to use `_PyType_Lookup`. That is hard to circumvent when the limited API is used. Therefore, the current implementation will be it for 5.15 . At most we might add a few missing properties through XML. Task-number: PYSIDE-1019 Change-Id: I56a9eabe5f774c1ff04c149227e06318c8bf4f29 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Brush up the basicsortfiltermodel exampleFriedemann Kleint2020-10-091-54/+65
| | | | | | | | | | | | Replace the deprecated QRegExp by QRegularExpression, introducing an enumeration for the filter types as is done in the C++ example. Import classes. Task-number: PYSIDE-841 Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I6aa1bc2b325bb5168c70be3c28a59c5c7629fe3e Reviewed-by: Christian Tismer <tismer@stackless.com>
* Replace deprecated API in examplesFriedemann Kleint2020-10-084-15/+21
| | | | | | | | | | | - Replace qrand() by QRandomGenerator - Replace QMatrix by QTransform Task-number: PYSIDE-841 Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I8609a9ce90a6df1cb7c7f1b9aab61695edf41a3f Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken2: Recurse to generated base class for baseFriedemann Kleint2020-10-081-2/+9
| | | | | | | | | Skip base classes whose generation was disabled by reject or generate='no'. This can happen for typedef entries. Task-number: PYSIDE-1202 Change-Id: Ie6fac2408a6aa7b3303b4f06e744a2d2405e2a30 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken2: Rearrange values of enum TypeEntry::CodeGenerationFriedemann Kleint2020-10-086-34/+25
| | | | | | | | | | | | | | | | | | | | TypeEntry::CodeGeneration::GenerateCpp was unused. Consequently, the GenerateAll mask is not needed, either. Replace GenerateCpp and GenerateTargetLang by a generic GenerateCode value. Introduce a new GenerationDisabled value to be able to distinguish a generate='no' XML attribute from a plain rejection. Fix many invalid usages of bool generateCode() testing against the flag value. Use the enum instead of uint for the code generation field. Task-number: PYSIDE-1202 Change-Id: I0aec5bd1ebfb9a50b80d5a187372c4271490e1b3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken2: Generate extra includes into wrapper headerFriedemann Kleint2020-10-083-8/+18
| | | | | | | | | | For wrapper types, generate the class-related extra includes into the wrapper header since they might be required for it (for example, instantiation type of a typedef typesystem entry). Task-number: PYSIDE-1202 Change-Id: I9f57bdfe54d6273e4a1ffa9570e3352959dea480 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken2: Enable includes and modifications on typedef entriesFriedemann Kleint2020-10-081-5/+18
| | | | | | | | | | | | | Extra includes might be required for the template instantiation type. Add the includes and modifications obtained from parsing the sub-elements to the target entry in endElement(). Complements bfd1de3495b18c0ecc251260442a9a46009861e. Task-number: PYSIDE-725 Task-number: PYSIDE-1202 Change-Id: I71e399879feb641238d4d6035faa3f4c34932a87 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* __feature__: avoid sys._geframe(1) error when embeddingChristian Tismer2020-10-071-1/+3
| | | | | | Change-Id: Ife42d7a3f855816c66dcbd4b8062b72f947510e7 Fixes: PYSIDE-1398 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* wheel_tester.py: No longer use class OPTIONS from the build scriptsFriedemann Kleint2020-10-071-12/+9
| | | | | | | | | The semantics have changed, the OPTIONS dict is not fully populated at startup. Task-number: PYSIDE-807 Change-Id: Ic076f4ec8d624119d11e6ee266e2f6ccdb702b1e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* setup.py: Refactor PysideBuild::run()Friedemann Kleint2020-10-071-149/+153
| | | | | | | | | | | | The function produces a warning about a too-high cyclomatic complexity. Factor out functions to retrieve the make program and the Python library. Streamline the code to avoid repetitive find_executable() invocations and unindent the multi-arch code. Change-Id: I7aac9bc1324e57878e97d81b3e0424f055f7f2b9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>