aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup version strings for 5.13.2 releasev5.13.25.13.2Simo Fält2019-10-312-4/+4
| | | | | Change-Id: I1312e043dab444b11d6ec6935b6100310c4d99ee Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add changelog for 5.13.2Cristián Maureira-Fredes2019-10-291-0/+37
| | | | | | | Change-Id: Ib9349b45e16750f9384d65a22806f48741a732e8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 403cfed02b017d80361cdb5b9bba8c4aad7a14bf) Reviewed-by: Simo Fält <simo.falt@qt.io>
* Fix booleans and empty list cases in QSettingsCristián Maureira-Fredes2019-10-282-16/+73
| | | | | | | | | | | | | | | | | | | | | After the fix for PYSIDE-1010 there were two things that were not properly understood: 1. A special case for booleans was required, 2. When a list was detected, the split was wrongly creating a list with a '0' instead of an empty one. Additonally, due to the wrong treatment we couldn't notice if the value 0 was None, the number zero, or even false, so this patch amends the previous implementation to properly treat these cases. New test cases were added. Change-Id: I41d5387bb835cfa96f94e5577e993a4b87b303f0 Fixes: PYSIDE-1130 Fixes: PYSIDE-820 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Doc: Use the exclude_patterns instead of exclude_treesVenugopal Shivashankar2019-10-281-1/+1
| | | | | | | | | | The extras directory should be ignored by sphinx, otherwise we'll have duplicate module pages. The exclude_trees sphinx config is deprecated since the v1.0 release. The alternative for it is the exclude_patterns. Change-Id: I2fa8a0c3d8080bc838397091dfad950a97aa697e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix Python 3 deprecation warning about Buffer APIFriedemann Kleint2019-10-251-0/+4
| | | | | | | | | Use new buffer protocol, fixing: sources/shiboken2/libshiboken/shibokenbuffer.cpp: In function ‘bool Shiboken::Buffer::checkType(PyObject*)’: sources/shiboken2/libshiboken/shibokenbuffer.cpp:46:42: warning: ‘int PyObject_CheckReadBuffer(PyObject*)’ is deprecated [-Wdeprecated-declarations] Change-Id: I3e3a403306d86c940bf1bd71fc672db6e0a2ea60 Reviewed-by: Christian Tismer <tismer@stackless.com>
* abstractmetabuilder_p.h: Fix compilation with some versions of g++Friedemann Kleint2019-10-251-1/+1
| | | | | | | | | | Fix the return type, which caused complaints by some versions of g++: sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h: In member function 'ScopeModelItem AbstractMetaBuilderPrivate::popScope()': sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h:61:57: error: could not convert 'QList<T>::takeLast() [with T = QSharedPointer<_NamespaceModelItem>]()' from 'QSharedPointer<_NamespaceModelItem>' to 'QSharedPointer<_ScopeModelItem>' Change-Id: I94abdfb9d76d3f0078e198b4230129150d2f43ea Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Doc: Add the additional and the API ref pages to the toctreeVenugopal Shivashankar2019-10-254-54/+76
| | | | | | | | | The breadcrumb does not work as expected without these pages in the toctree. In addition, changed the module page links to use the :mod: directive instead of the :doc:. Change-Id: I0fc86ae0026375d4924b870c5e20c504aea3aed1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Shiboken: QtDoc: Fix how brief and class tags are handledVenugopal Shivashankar2019-10-251-5/+1
| | | | | | | | | | | - The brief attribute of a page tag should be ignored to avoid briefs appearing twice. - The class ref pages should use the .. currentmodule:: rst directive instead of the .. module::. Change-Id: Iac205d60f79db49eb8c69a2593f09fb206a5b1a3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken: Fix pyi generation for external modulesAndreas Beckermann2019-10-251-5/+0
| | | | | | | | | | | | | | | enum_sig.py is used to generate .pyi files (in sources/pyside2/PySide2/support/generate_pyi.py) from the bindings. The file can also be useful by external modules that were generated by shiboken, however the check for the modulename being PySide2 or shiboken2 prevents this. Remove this check, as discussed on IRC. This seems to be working internally as well and re-adds support for usages by external modules. Change-Id: I81af943c43f8f84aa0b0d89260cd99215acdb10d Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix hasVirtualDestructor() for implicit destructorsAndreas Beckermann2019-10-253-1/+39
| | | | | | | | | | | | | | | | | If a derived class does not declare an explicit destructor, AbstractMetaClass::hasVirtualDestructor() is set to false. However this is incorrect for classes that have a base class that in turn provide a virtual destructor. Consequently shiboken generates incorrect code in cases where it depends on that value (e.g. for methods that override ownership of the returned object - instead of releasing ownership, shiboken invalidates it). This patch considers the baseClass()->hasVirtualDestructor() after traversing all functions (which checks for explicit destructors). Change-Id: Ifc4a472290d835dd6ef7d702b912643c9a2b42da Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add inject-code for QVideoFrame::bits()VaL Doroshchuk2019-10-252-0/+10
| | | | | | | | | | | | | Since QVideoFrame::bits() returns uchar* which is not covered by conversion functions, added the same replacement as was done for QImage::bits(). It should return a buffer object to satisfy Shiboken::Buffer::checkType(). Fixes: PYSIDE-849 Change-Id: I33bdb13f3b892f325ccf3b1ef4bef59744b60f2d Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add support for __repr__ in QObject derived classesAndreas Beckermann2019-10-2512-20/+185
| | | | | | | | | | | | | | | | | | | | | | Currently shiboken generates classes without __repr__ for QObject derived classes. However for all non-QObject classes that have an operator<<() for QDebug, it *does* add a valid repr implementation. Extend this behavior to QObject classes as well. In order for this to become more useful, also check for the indirection of operator<<(): If operator<<(QDebug, Foo*) is available, use the current non-value-type behavior, (i.e. provide cppSelf to operator<<()), but if operator<<(QDebug, const Foo&) is available instead, use the same behavior as for value-types, i.e. provide *cppSelf. This greatly increases the number of classes where operator<<() provides useful results. Also make sure to check for operator<<() in namespaces (recursively), not just at global scope. Change-Id: Ief9158455a25e332f07169f09692cafb8097078b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Release ownership in QAbstractVideoFilterWrapper::createFilterRunnableVaL Doroshchuk2019-10-241-1/+7
| | | | | | | | | | | | QAbstractVideoFilter::createFilterRunnable() is supposed to be called only from VideoOutput QML element when paint event is received, where the QML element takes the ownership of returned QVideoFilterRunnable object. Need to release the ownership, so Python will not delete the underlying C++ object. Fixes: PYSIDE-785 Change-Id: I041d9a43cafaf42d638778ea70b8a115276805b1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Doc: Minor fixes to the snippets and their orderVenugopal Shivashankar2019-10-163-2/+4
| | | | | Change-Id: Idf0bc429373180bf4c512014255eb7f6c93bd891 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Fix the broken download linksVenugopal Shivashankar2019-10-151-2/+2
| | | | | | | The links were using the the wrong directive. Change-Id: I3bbb3262d96857b66fff7d273f475514f880cb7c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Doc: Set up necessary infra. for example doc generationVenugopal Shivashankar2019-10-1510-1/+145
| | | | | | | | | Qdoc must be made aware of the .py and .pyproject file types to generate the example page. In addition, it needs the URL to the example on https://code.qt.io/pyside-setup.git to link. Change-Id: I824898831475b6fe3f66df0cd16df62a9301a69d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Shiboken: QtDoc generator: Handle 'group' tag as a 'page' tagVenugopal Shivashankar2019-10-151-4/+6
| | | | | | | | Also, add a title for the resulting rst either using the fullTitle or the title attribute. Change-Id: If8be6a9a6db2cfc86bc4b646159ccc6f2210e243 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Add Porting guide tutorialVenugopal Shivashankar2019-10-1529-0/+2443
| | | | | | | | | Moving the content from this wiki page: https://wiki.qt.io/Qt_for_Python/Porting_guide Change-Id: Ic4ad03ccd5b65bdf08e27dbf045fe7528ec6cdb4 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Split build instructions to build and packagingSimo Fält2019-10-151-22/+35
| | | | | | | | This will enable us to use Qt CI's signing function Task-number: PYSIDE-1049 Change-Id: If85114d525fab565326a03b465924d9028b3871c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix wrong "only package" condition in build_scripts/main.pyAlexandru Croitor2019-10-071-1/+1
| | | | | | | | | | | | build_extension was meant to not run either when --only-package is passed, or when the shiboken-generator is built as part of a top-level build. Fix the condition to represent that. Amends 43fe3494a9d902034896e3afa7b5158c77163be0 Change-Id: I9dbc8694b932c88227fcd3a987cd1413bc55c286 Reviewed-by: Simo Fält <simo.falt@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Shiboken: Provide a context for the additional docsVenugopal Shivashankar2019-10-071-1/+2
| | | | | | | | | Without the context, the images referred in the additional docs are not copied to the target directory. As as result, we have missing images in the HTML. Change-Id: I76bf4dafaa9ff82ef11755a64da7466596969460 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken: Fix handling of modified default expressionsFriedemann Kleint2019-10-046-5/+48
| | | | | | | | | | - Do not try to resolve modified default expressions (add enumeration scopes or similar) - Fix the signature parser to handle arbitrary expressions Fixes: PYSIDE-1095 Change-Id: I059c3a1f066687d7c2f0dad9ea7f0d93e292b1b5 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix bad shutdown effect on QApplication.instance()Christian Tismer2019-09-302-2/+25
| | | | | | | | | | | | | | | | | | | | | | | When app = QtWidgets.QApplication.instance() is used before a QApplication has been created, the qApp code sees no qApp instance in C++ and assumes a shutdown. This patch keeps track of QApplication being created and behaves correctly on that aspect. It is still unsolved that QtCore.QObject.staticMetaObject gets deleted on a qApp shutdown, which is too much. I think this can be handled in another patch if at all, since the shutdown / recreate feature is undocumented and of little use. Change-Id: I140b6dba45f7cd337580373dbf72bc6d0a625fea Fixes: PYSIDE-1093 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add .pyproject files for each exampleCristián Maureira-Fredes2019-09-2761-0/+198
| | | | | Change-Id: I4dec66067aa2b0cc50d1ac3226537e4f09006132 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Remove trailing whitespace from __repr__Andreas Beckermann2019-09-271-0/+1
| | | | | | | | | | | | | | | | | QDebug normally prints a trailing ' ', however the repr implementation does not expect so. Remove the trailing space, if it is there. This makes sure that e.g. PySide2.QtCore.QRegularExpression() is printed as <PySide2.QtCore.QRegularExpression("", QRegularExpression::PatternOptions("NoPatternOption")) at 0x1067a5d20> instead of <PySide2.QtCore.QRegularExpression("", QRegularExpression::PatternOptions("NoPatternOption")) at 0x1067a5d20> (note the double space before 'at') Change-Id: I6c088069a6a8ca42933a442cce7b576327a9d151 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Shiboken: Add check for 'external' link typeVenugopal Shivashankar2019-09-251-0/+2
| | | | | | | | | | | Apparently, qdoc generates <link...> entries with 'external' type, which is ignored by Shiboken. This leads to treating such links as reference links, leading to broken links in the HTML output. Change-Id: I426f91661ba1cc0b0f17b2e30fbddcf9e1fee530 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* libpyside: Fix compiler warningFriedemann Kleint2019-09-251-1/+2
| | | | | | | | | | | | | Restore the warnings formatting code in helper fillQtProperties() to what it was before, (since QByteArray propName is constructed from PyObject *key), fixing: format ‘%S’ expects argument of type ‘wchar_t*’, but argument 3 has type ‘PyObject*’ {aka ‘_object*’} [-Wformat=] Amends bff242cfd8a34dcf2848a8864732eb5bdf85dbf0. Task-number: PYSIDE-1019 Change-Id: I724c5eb698327b8b6474c895f1b149b08e729bd1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Example: Replace date type with text for authors' birthdateVenugopal Shivashankar2019-09-201-7/+6
| | | | | | | | | | | Apparently, SQLite does not have the 'date' type. Instead, 'text' type is recommended by its docs. Moreover, the python datetime object does not translate to an appropriate type in SQLite. So str() seems the right alternative for date at the moment. Change-Id: I246c0708e60469a0fb253d33bdf8ab506eece1c9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Disable Android target from CISimo Fält2019-09-201-1/+1
| | | | | Change-Id: I4945620d3328cfd26a713306730beb64445136f4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"Friedemann Kleint2019-09-114-6/+42
|\
| * Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-09-114-6/+42
| |\ | | | | | | | | | Change-Id: I7f3e2a11fe744b5c868698e63cf10882c168c53f
| | * Remove extra ref on QDataStream::setDeviceCristian Maureira-Fredes2019-09-061-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the documentation the object does not take ownership of the QIODevice. Change-Id: I1a617844fd825e6420167c4a5d848fd36e90823f Fixes: PYSIDE-1007 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Fix heaptype conflict with QtCore.QObject.__new__in Python 2.7Christian Tismer2019-09-061-40/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patching of the type generation needs to become universal. Additional to the patch for SbkObjectType_TypeF, we now patch * SbkObjectTypeTpNew * introduceWrapperType which makes the modifications for the heaptype flag complete. Actually, the modification of tp_new_wrapper has to be more sophisticated in this general case: We follow the __mro__ and patch exactly those functions which have the old wrapper and add the new wrapper. Change-Id: I51d4d77c99bd18eed2e31d2ab21143c0f4e2ea6c Fixes: PYSIDE-1051 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 cd6172063756a59e02f1a7857bc60a1737214ad1)
| | * Add 5.12.5 changelogCristián Maureira-Fredes2019-09-061-0/+40
| | | | | | | | | | | | | | | Change-Id: I74b02a12aa9c1dd25c607cf17dfcd04a3908725d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| | * Bump version for 5.12.5Simo Fält2019-08-272-2/+2
| | | | | | | | | | | | | | | Change-Id: I741a7880bf87cca4a6482cc0e07e6f878e2e02b3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | | Fix formatting of the deployment documentationFriedemann Kleint2019-09-111-5/+5
|/ / | | | | | | | | | | | | | | Fix wrapping and bullet list. Fixes: PYSIDE-1089 Change-Id: Ibf4c7f6ccb5b167da6ccb4afa9cc2c51d0551c78 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Bump version to 5.13.2Simo Fält2019-09-062-2/+2
| | | | | | | | | | Change-Id: I4e65ab4e24d563372e548f426b830a9490b8e99f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Add 5.13.1 changelogCristián Maureira-Fredes2019-09-041-0/+47
| | | | | | | | | | | | Change-Id: I3b0330b4fe4e1ab63b78c583abb46f355bcf10ab Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Fix heaptype conflict with QtCore.QObject.__new__in Python 2.7Christian Tismer2019-09-031-40/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patching of the type generation needs to become universal. Additional to the patch for SbkObjectType_TypeF, we now patch * SbkObjectTypeTpNew * introduceWrapperType which makes the modifications for the heaptype flag complete. Actually, the modification of tp_new_wrapper has to be more sophisticated in this general case: We follow the __mro__ and patch exactly those functions which have the old wrapper and add the new wrapper. Change-Id: I51d4d77c99bd18eed2e31d2ab21143c0f4e2ea6c Fixes: PYSIDE-1051 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Doc: Improve the documentation styleTopi Reinio2019-09-022-40/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Restyle the admonition (warning/note/seealso) paragraphs, use the same font for all link types, and separate entries with ', '. - Drop the rounded corners on multiple section titles. - Use a monospace font for enumeration tables (value column). - Restyle the <blockquote> element that is used for overload/parameter docs to separate them from the documentation 'body'. - Replace list-style-type:'' with list-style:none as the former does not work on all browsers. Change-Id: I0c37bd05448d7ce38a47af7449ca0bc9efff68b4 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | signature: Support typing.Optional[T] and refine a bitChristian Tismer2019-08-298-78/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signature was missing "typing.Optional[T]" which has to be wrapped around any argument with a default value of "None". This is the only case where the repr of a type looks different than it was written, because it renders as "typing.Union[T, NoneType]". Solving that by redefining a few typing structures was way too hard and too error prone. It was finally solved by a regex replacemet that is run as a post process in generate_pyi.py . The enumerations are now even more complete, since toplevel enums are also included. This had the effect that enums with Python keywords were revealed, and so the function "createEnumItem" had to be modified. The order of creation was also changed to avoid name clashes. The overall structure was improved, and instead of parsing the generated signatures to find out if something is a class method, this is now very cleanly implemented as an inquiry to get_signature(). I tried to make sense of the flags structure that comes with many enums. PyQt5 has a standard set of "__...__" methods without useful signature information. I could mimick that as well, but that would create a whole lot of pointless extra information. We should decide later if it makes sense to include that. Right now the flags structures show the class name, only. This patch will be merged with the 5.14 branch. The additions of this patch could fortunately be placed into areas which do almost not overlap with the 5.14 signature additions. Change-Id: Ie513e15917b04d746ab597fb7a9eb1fd766f7c73 Fixes: PYSIDE-1079 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | CMake modularization: macros creationCristián Maureira-Fredes2019-08-287-441/+486
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First step of this process that only considers the idea of encapsulate the diffrent CMake processes we currently have in all our main CMakeLists.txt files. This patch simply takes some sections of the existing cmake files and move them to a macro file. Additionally, a couple of macros were written twice in shiboken and pyside, so now they are only once. Task-number: PYSIDE-1033 Change-Id: I2c63d8a2eba3d8951097ec9c9042c782fde5dd62 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"Jukka Jokiniva2019-08-273-1/+8
|\ \
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Jukka Jokiniva2019-08-273-1/+8
|/| | | |/ | | | | Change-Id: Id820dfc57338b9630b77448a697aa9da029ddadf
| * Add Proprietary License to be show in metadataSimo Fält2019-08-261-0/+1
| | | | | | | | | | | | | | | | | | | | Adding Proprietary License to METADATA to indicate possibility for commercial licencing. License will be shown in pypi.org with LGPL possibility. Change-Id: Ic389adc2a867b9ea1118574fdf627e78acb02ba2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * Documentation: add a paragraph related to licensesCristián Maureira-Fredes2019-08-261-0/+6
| | | | | | | | | | | | | | | | This is required to be showed on the description page on PyPi. Change-Id: I6e25736ea8540c8e5426dbe9d48678efc1033e0c Reviewed-by: Simo Fält <simo.falt@qt.io>
| * Fix Xcode sdk value embedded into PySide2 binariesAlexandru Croitor2019-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously when building on the Coin VMs, the incorrect Xcode sdk value of "10.0" was embedded into all the built shiboken and PySide2 binaries. This causes issues when trying to notarize a PySide2 app. The reason why this happens is described as a long investigation on the respective bug report. The fix is to ask xcrun to report an SDK path which contains the version number in the SDK path (/path/to/MacOSX10.14.sdk vs just /path/to/MacOSX.sdk). Change-Id: I3f02510953e2f54032c19a48cb8a7162814bf9e7 Fixes: PYSIDE-1066 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simo Fält <simo.falt@qt.io>
* | Fix a typing bug in Python 2.7 and updateChristian Tismer2019-08-222-94/+431
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The typing module has problems if it exists twice. This gave trouble with matplotlib, when typing was imported and then called PySide indirectly. The only reliable cure appears to be to use the typing module if it is already in sys.modules . The typing27 modue was updated to the latest version of https://github.com/python/typing (original file with additional license headers). Fixes: PYSIDE-1073 Change-Id: Iebfdfe7fd51080a9334db332719928c001501381 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Add QtCore.Slot.__signature__ and much more manuallyChristian Tismer2019-08-2112-65/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signature of QtCore.Slot and other classes could not automatically be generated because the function is not generated by cppgenerator.cpp . We add it manually in the C++ code into the generation process. The case of QtCore.Slot had diverse follow-up issues to be solved: - Classes which did not inherit from Shiboken were not generated. This is a long-standing omission and creates very many new simple types. - The arity of Slot has default arguments after the varargs parameter "*types". This needed an extended Python parser analysis that fixes the arguments given to the inspect module, accordingly. - The signature generation was completely new implemented and relies no longer on the restricted syntax of a Python (2) function but generates signatures directly as Parameter instances. Implemented classes with hand-made signatures: QtCore.ClassInfo QtCore.MetaFunction, QtCore.MetaSignal QtCore.Property QtCore.Signal QtCore.SignalInstance QtCore.Slot QtQml.ListProperty QtQml.VolatileBool As a side effect, many more subtypes were published. Enums are done, which concludes this work. Fixes: PYSIDE-945 Fixes: PYSIDE-1052 Change-Id: Ic09f02ece3a90325519e42e4e39719beb0c27ae9 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Fix wrong Python init return codesChristian Tismer2019-08-205-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PySide classes had wrong return values in their init code. In case of errors, they would not show up immediately. The following modules are affected: sources/pyside2/libpyside/pysideclassinfo.cpp sources/pyside2/libpyside/pysideproperty.cpp sources/pyside2/libpyside/pysidesignal.cpp sources/pyside2/libpyside/pysideslot.cpp sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp This error exists since Nov 03 2010 . Fixes: PYSIDE-1077 Change-Id: I8cf9bf7d1d8f8dca1155274cb24408f423557bac Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>