aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* setup.py: Fix some flake8 warningsFriedemann Kleint2020-10-076-22/+21
| | | | | | | Fix spaces around operators, missing lines, import order. Change-Id: I05ecafec849578fed6018654fcefaa008b6801e8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix leak in static string destruction, addendumChristian Tismer2020-10-061-3/+8
| | | | | | | | | | | | | | | | | | When checking a debug build, refcounting problems showed up. The reason was that somewhere the static strings were treated with normal refcounting. This is easily possible if some string is used in the interpreter: The string becomes interned, maybe before it is used by us, and will be deallocated without our knowledge. We are turning the list of referenced strings into a set. Also, the strings are made immortal by adding one extra count. This way, our set does not need to cope with deletions and will work either way. The final cleanup removes that, anyway. Change-Id: I192ea47f739cc785ea3e354cfb82c5fa5a6eac78 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* setup.py: Remove constructor parameters depending on options from ↵Friedemann Kleint2020-10-064-133/+179
| | | | | | | | | | | | | PysideBuildWheel Constructor parameters depending on option values create a problem for introducing per-command option parsing. To fix this, split utility functions used by the commands in main.py and PysideBuildWheel into a separate wheel_utils.py Task-number: PYSIDE-807 Change-Id: Idabd3ba03726d2284e80234fc8485b70e6eb20ca Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix leak in static string destructionChristian Tismer2020-10-061-5/+12
| | | | | | | | | | | | | | When checking a debug build, refcounting problems showed up. It is unclear where references are lost, at the moment at the strings "__div__" and "__idiv__". It is possible that these strings were already in a destruction list of another module. When turning the list into a set, the problem vanishes, because we no longer know how much references to expect. Because they are not negative, this seems to be ok. Change-Id: I0bc59b83f43becf5ee5f5f19213fc46513041909 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken2: Simplify the export of the generated module init functionFriedemann Kleint2020-10-062-10/+2
| | | | | | | | Replace the macro generated into the code by the one introduced by 430d02db24b95a56ae0acc6a9df6a0effe49da0d. Change-Id: I8e713ff25c180a22569a3ba589d04dca43fdc804 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* setup.py: Do not display help multiple timesFriedemann Kleint2020-10-061-1/+5
| | | | | | | | Run only the pyside build when help is requested. Task-number: PYSIDE-807 Change-Id: I0aa5bf2db0a6a7e6e32a66357efd200af70dd653 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Generate flags operator methods for QFlags on hidden top level namespaceRenato Araujo Oliveira Filho2020-10-067-12/+117
| | | | | | | | | | Factor out method to write the operator functions and call it for the module wrapper, too. Fixes: PYSIDE-1326 Change-Id: I5b6faf19d253d5828474dec36b454aa20753123c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* setup.py: Make it possible to access QtInfo from several sourcesFriedemann Kleint2020-10-062-200/+212
| | | | | | | | | | - Turn it into a singleton. - Move the qtchooser resolving code into QtInfo. - Delay-initialize the dictionary. Task-number: PYSIDE-807 Change-Id: I3be2f3d0e0e9bc8aa61e1ec90ea37f7078c7f0bb Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* setup.py: Fix check for limited APIFriedemann Kleint2020-10-062-2/+3
| | | | | | | | Check for "yes"/"no", consistently. Task-number: PYSIDE-807 Change-Id: Id9f2ba125acb9ea8e811fd6cb5994bbb070605de Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Documentation: Fix virtualenv URLFriedemann Kleint2020-10-051-1/+1
| | | | | | Fixes: PYSIDE-1391 Change-Id: I48e8878cca28831eb881383a31d4b4b87236c85d Reviewed-by: Christian Tismer <tismer@stackless.com>