aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.11.3' into 5.115.11Friedemann Kleint2018-12-072-12/+1
|\ | | | | | | Change-Id: I7d67c64e7c6f58fb3907bcac6f4cf7342ffc3552
| * Revert QAbstractVideoSurface patch5.11.3Cristian Maureira-Fredes2018-12-071-11/+0
| | | | | | | | | | | | | | | | | | | | | | This will re-open PYSIDE-794, but it was a wrong solution that was breaking the other setVideoOutput signatures, causing a sefault on the `player` example. Change-Id: I31d7449ff11e4e44e8494b98d7e9ec58a636c8e4 Fixes: PYSIDE-864 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Cleanup version strings for 5.11.3 release, take 2Simo Fält2018-12-051-1/+1
| | | | | | | | | | | | | | We need to empty the pre_release_version_type string also. Change-Id: I4229dd56aa2da14f081a9e55cb965be1e36a87a5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Cleanup version strings for 5.11.3 releaseSimo Fält2018-12-051-1/+1
|/ | | | | | | Change-Id: I3fe96a92675dd81459777646593cb5c5737cc245 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Bump version strings for impending 5.11.3 releaseAlexandru Croitor2018-11-191-1/+1
| | | | | | Change-Id: I96cbb7dc06572629f88f11e5d75dd2a20ffe5def Reviewed-by: Simo Fält <simo.falt@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QIODevice bindings: Fix invalid reads in read() functionsFriedemann Kleint2018-10-312-7/+5
| | | | | | | | | | | | | | | | | | | | | | | When running test in debug mode on Windows, failures occurred: File "sources/pyside2/tests/QtCore/qfileread_test.py", line 41, in readData return super(FileChild2, self).readData(maxlen) UnicodeDecodeError 'utf-8' codec can't decode byte 0xcd in position 21: invalid continuation byte File "C:/dev/pyside/pyside-setup511d/sources/pyside2/tests/QtCore/qfile_test.py", line 57, in testBasic self.assertFalse(obj.getChar()[0]) UnicodeDecodeError 'utf-8' codec can't decode byte 0xcc in position 0: unexpected end of data This is caused by missing initializers and terminating \0 characters in the QByteArrays introduced by ca806b438e8a27dc4562ac806d189765e93e09e5, unearthed by MSVC helpfully filling unitinialized data with random values. Fix by using a QByteArray of size n + 1 filled with 0. Initialize the character variable in the fix_char* template. Task-number: PYSIDE-40 Change-Id: Ia604841a89f1b1b9564c16d2f23cd9f7c20f5628 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix Memory Leak Caused By Wrong Limited API DefaultChristian Tismer2018-10-297-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a type has nullptr as tp_dealloc, there apply different defaults. Static types had object_dealloc as default, while new heaptypes created with type_new have subtype_dealloc as default. A problem was now that PyType_FromSpec also has subtype_dealloc as default. But that is wrong, because a type that was written with the static type approach is already written with object_dealloc in mind and takes somehow care about further issues with that type. When we now convert this type and suddenly use subtype_dealloc instead of object_dealloc, things get pretty wrong. Finding that out was pretty hard and took quite long to understand. The fix was then very easy and is the best proof: Replacing our former (wrong) solution of supplying an SbkDummyDealloc with a function object_dealloc works perfectly, and the leakage completely vanished. The documentation now is also corrected. Task-number: PYSIDE-832 Change-Id: Ifc20c28172eb5663cd5e60dac52e0a43acfb626c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add qCompress/qUncompress bindingsCristian Maureira-Fredes2018-10-221-0/+4
| | | | | | Task-number: PYSIDE-838 Change-Id: I88a8c90b53757f05668782bc407e8529f6fbb3c6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Update the Registry After Explicit Linux NamingChristian Tismer2018-09-133-0/+55868
| | | | | | | | | | | Linux is now renamed in a way that the Linux distributions are recognized. The names are a _bit_ verbose, but this works, at least :-) Task-number: PYSIDE-510 Change-Id: Icd52cc92aa0e0b9c6e6b38e632cb89d09766c190 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Update the Signature Registry After ResetChristian Tismer2018-09-133-2/+37691
| | | | | | | | | | | | | | | | | | | New exists_{platf}_{version}_ci.py have created, after the registry was reset in the last commit. We had a problem with differences between Linux versions which led to incompatibilities. Therefore, the platform name has been changed for Linux: We now distinguish Linux platforms by name and version by using platform.linux_distribution([:2]). Example.. "Ubuntu 16.04" becomes 'ubuntu1604'. When this checkin succeeds, we will need another last checkin. Change-Id: I98511ee6fc3273055d1990a2cf4f2c028a430455 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add explanation to findChild/findChildren methodsCristian Maureira-Fredes2018-09-121-0/+16
| | | | | | | | | | | | | The error message when use these methods was not explaining that the first argument needed to be the parent's type. This adds a small phrase a code snippet that clarify the situation. Task-number: PYSIDE-776 Task-number: PYSIDE-691 Change-Id: I0af57d65065b6d87f195d5f42fd1140a864c5edf Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Automate Parsing COIN testresults for exists_{platf}_{version}_ci.pyChristian Tismer2018-09-101-0/+341
| | | | | | | | | | | | | | | | | | The extraction of exists_{platf}_{version}_ci.py has been done by editing the testresults of COIN test by hand. Since the beginning of the year, this has become tedious, because COIN now surrounds everything with time stamps. This script scans the whole website and extracts all such files. Creation of the generated python pages becomes really easy now. The initial scan takes below 30 minutes. Then it will only parse new URLs. Task-number: PYSIDE-510 Change-Id: I1273f8a77596ced16c7a3653c89736c3e1796540 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Reset the Signature Registry after the Total ScanChristian Tismer2018-09-106-55775/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After scanning the whole COIN test website, a lot of changes were found which we missed by manually inspectation. This update contains the essence of all changes which accumulated on the server. They were sorted by date, and the latest version was taken. Then, the license headers were updated, because that had been done already on the repository. Update ------ This check-in did not work on 2018-09-07. The reason was that we changed the PySide version to 5.11.2, which was not yet in my update. While re-doing the generation, I realized that we will not automatically get the 5.11.2 version, because of the "fallback". feature. To reset the existence file, we need to remove them once. After the checkin, all the files will be freshly created. I propose also to disable the "fallback" feature. In the presence of the multiple COIN testing, it is no more necessary. Change-Id: I43af314f7bd233a4190762c7204e8aecf81bfe72 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide2: Fix warnings about not finding function for modificationFriedemann Kleint2018-09-073-62/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove some functions that are no longer present. In QtDataVisualization, remove a rejection that did not have any effect since the type was not qualified by namespace and qualify the modifications by namespace and resolve typedefs, amending 966fa464d1f91292c91bede88bfaf1741acdce6e. Fixes warnings: (qml) signature 'QQmlImageProviderBase()' for function modification in 'QQmlImageProviderBase' not found. (datavisualization) signature 'addAxis(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DScatter' not found. (datavisualization) signature 'releaseAxis(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DScatter' not found. (datavisualization) signature 'setAxisX(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DScatter' not found. (datavisualization) signature 'setAxisY(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DScatter' not found. (datavisualization) signature 'setAxisZ(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DScatter' not found. (datavisualization) signature 'resetArray(QScatterDataArray*)' for function modification in 'QtDataVisualization::QScatterDataProxy' not found. (datavisualization) signature 'addItem(QScatterDataItem)' (specified as 'addItem(const QScatterDataItem&)') for function modification in 'QtDataVisualization::QScatterDataProxy' not found. (datavisualization) signature 'addItems(QScatterDataArray)' (specified as 'addItems(const QScatterDataArray&)') for function modification in 'QtDataVisualization::QScatterDataProxy' not found. (datavisualization) signature 'insertItem(int,QScatterDataItem)' (specified as 'insertItem(int, const QScatterDataItem&)') for function modification in 'QtDataVisualization::QScatterDataProxy' not found. (datavisualization) signature 'insertItems(int,QScatterDataArray)' (specified as 'insertItems(int, const QScatterDataArray&)') for function modification in 'QtDataVisualization::QScatterDataProxy' not found. (datavisualization) signature 'setItem(int,const QScatterDataIteItem;)' (specified as 'setItem(int, const QScatterDataIteItem;)') for function modification in 'QtDataVisualization::QScatterDataProxy' not found. (datavisualization) signature 'setItems(int,QScatterDataArray)' (specified as 'setItems(int, const QScatterDataArray&)') for function modification in 'QtDataVisualization::QScatterDataProxy' not found. (datavisualization) signature 'addAxis(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DSurface' not found. (datavisualization) signature 'releaseAxis(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DSurface' not found. (datavisualization) signature 'setAxisX(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DSurface' not found. (datavisualization) signature 'setAxisY(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DSurface' not found. (datavisualization) signature 'setAxisZ(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DSurface' not found. (datavisualization) signature 'QSurface3DSeries(QSurfaceDataProxy*,QObject*)' for function modification in 'QtDataVisualization::QSurface3DSeries' not found. (datavisualization) signature 'setDataProxy(QSurfaceDataProxy*)' for function modification in 'QtDataVisualization::QSurface3DSeries' not found. (datavisualization) signature 'populateCopy(QValue3DAxisFormatter&)' for function modification in 'QtDataVisualization::QValue3DAxisFormatter' not found. (datavisualization) signature 'addRow(QSurfaceDataRow*)' for function modification in 'QtDataVisualization::QSurfaceDataProxy' not found. (datavisualization) signature 'insertRow(int,QSurfaceDataRow*)' (specified as 'insertRow(int, QSurfaceDataRow*)') for function modification in 'QtDataVisualization::QSurfaceDataProxy' not found. (datavisualization) signature 'setRow(int,QSurfaceDataRow*)' (specified as 'setRow(int, QSurfaceDataRow*)') for function modification in 'QtDataVisualization::QSurfaceDataProxy' not found. (datavisualization) signature 'resetArray(QSurfaceDataArray*)' for function modification in 'QtDataVisualization::QSurfaceDataProxy' not found. (datavisualization) signature 'setDataProxy(QBarDataProxy*)' for function modification in 'QtDataVisualization::QBar3DSeries' not found. (datavisualization) signature 'setDataProxy(QBarDataProxy*)' for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'resetArray(QBarDataArray*)' for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'resetArray(QBarDataArray*,QStringList&QStringList)' (specified as 'resetArray(QBarDataArray*,const QStringList&const QStringList&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'addRow(QBarDataRow*)' for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'addRow(QBarDataRow*,QString)' (specified as 'addRow(QBarDataRow*, const QString&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'addRows(QBarDataArray&)' for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'addRows(QBarDataArray&,QString)' (specified as 'addRows(QBarDataArray&, const QString&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'insertRow(int,QBarDataRow*)' (specified as 'insertRow(int, QBarDataRow*)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'insertRow(int,QBarDataRow*,QString)' (specified as 'insertRow(int, QBarDataRow*, const QString&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'insertRows(int,QBarDataArray&)' (specified as 'insertRows(int, QBarDataArray&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'insertRows(int,QBarDataArray&,QString)' (specified as 'insertRows(int, QBarDataArray&, const QString&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'setRow(int,QBarDataRow*)' (specified as 'setRow(int, QBarDataRow*)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'setRow(int,QBarDataRow*,QString)' (specified as 'setRow(int, QBarDataRow*, const QString&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'setRows(int,QBarDataArray&)' (specified as 'setRows(int, QBarDataArray&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'setRows(int,QBarDataArray&,QString)' (specified as 'setRows(int, QBarDataArray&, const QString&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'setDataProxy(QScatterDataProxy*)' for function modification in 'QtDataVisualization::QScatter3DSeries' not found. (datavisualization) signature 'addCustomItem(QCustom3DItem*)' for function modification in 'QtDataVisualization::QAbstract3DGraph' not found. (datavisualization) signature 'addInputHandler(QAbstract3DInputHandler*)' for function modification in 'QtDataVisualization::QAbstract3DGraph' not found. (datavisualization) signature 'addTheme(Q3DTheme*)' for function modification in 'QtDataVisualization::QAbstract3DGraph' not found. (datavisualization) signature 'releaseCustomItem(QCustom3DItem*)' for function modification in 'QtDataVisualization::QAbstract3DGraph' not found. (datavisualization) signature 'releaseInputHandler(QAbstract3DInputHandler*)' for function modification in 'QtDataVisualization::QAbstract3DGraph' not found. (datavisualization) signature 'releaseTheme(Q3DTheme*)' for function modification in 'QtDataVisualization::QAbstract3DGraph' not found. (datavisualization) signature 'setActiveInputHandler(QAbstract3DInputHandler*)' for function modification in 'QtDataVisualization::QAbstract3DGraph' not found. (datavisualization) signature 'setActiveTheme(Q3DTheme*)' for function modification in 'QtDataVisualization::QAbstract3DGraph' not found. (datavisualization) signature 'addAxis(QAbstract3DAxis*)' for function modification in 'QtDataVisualization::Q3DBars' not found. (datavisualization) signature 'releaseAxis(QAbstract3DAxis*)' for function modification in 'QtDataVisualization::Q3DBars' not found. (datavisualization) signature 'setColumnAxis(QCategory3DAxis*)' for function modification in 'QtDataVisualization::Q3DBars' not found. (datavisualization) signature 'setRowAxis(QCategory3DAxis*)' for function modification in 'QtDataVisualization::Q3DBars' not found. (3drender) signature 'attenuation()const' (specified as 'attenuation() const') for function modification in 'Qt3DRender::QSpotLight' not found. Task-number: PYSIDE-487 Change-Id: I61ebc2e29aa2a04c749f5c522fb7f06e35e1b172 Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide2: Add some enumerations that were overlooked beforeFriedemann Kleint2018-09-065-3/+11
| | | | | | Change-Id: I038ac183e70c27929837ff93b5921c2dbe00f48b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Doc: Remove redundant .qdocconf files from the buildTopi Reinio2018-09-053-6/+2
| | | | | | | | | | | | QtMultimedia, QtWebEngine modules are handled with a single .qdocconf file in Qt 5. There's no need to feed them twice to QDoc. This removes most '(qdoc): Output file already exists' warnings. Change-Id: If250c9c56f7ca54c27440badd66d9ddba704f26d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Support for QAbstractVideoSurface in QMediaPlayerCristian Maureira-Fredes2018-08-291-0/+11
| | | | | | | | | | The method setVideoOutput did not have support for an QAbstractVideoSurface argument, so I included one with the same idea of the other signatures. Task-number: PYSIDE-794 Change-Id: I50c82eeb1c2c3157c21dc4eb6cff7b0c2b91f31f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide2: Fix compilation with a with custom namespace specified for QtFriedemann Kleint2018-08-292-0/+4
| | | | | | | | | | | Add missing QT_BEGIN/END_NAMESPACE macros. Patch as provided on bug report. Task-number: PYSIDE-635 Change-Id: I7ddb447f1aafeb8da72e7e192905bafe3809797d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix help display of backport_inspect (python 2.7)Christian Tismer2018-08-282-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Python 2.7 has no signatures in its inspect module. We therefore add the missing stuff for the signature package using 'backport_inspect.py'. The resulting module is a bit unusual because it is assembled from different modules at runtime. When trying the code >>> from PySide2.support.signature import inspect >>> help(inspect) in Python2, we got only very little information because of some heuristics in the pydoc module that checks the module identity and finds only objects from the new one. It turned out that this heuristics can be circumvented when the "__all__" property is provided. pydoc then believes everything. We now have complete help info if the above module is used. The original inspect module is not changed at all. Change-Id: I3f24ada3b9ae9c79ec69a6280ddf3ea78735467b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add ownership transfer to setGraphicsEffectCristian Maureira-Fredes2018-08-271-0/+5
| | | | | | Task-number: PYSIDE-66 Change-Id: Ifec85a5305bc196b261818bbc1b9af16fc07c927 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Reduce the redundant signature_testChristian Tismer2018-08-273-89/+5
| | | | | | | | | | | | | | | | | | The file signature_test.py contained together with basic signature property tests also an early form of the existence test, which is meanwhile implemented in pyside2/tests/registry/existence_test.py . This part is redundant in signature_test.py, and we remove it. The basic signature tests stay, and the module is degraded from registry to a normal test module in pyside2/tests/QtWidgets . Remark: This simplification was found when I was finishing the signature documentation. Instead of describing the intermediate state of the module, it was more straight-forward to remove the duplication. Task-number: PYSIDE-510 Change-Id: I7fbf65d6d2803926dc00485f1e82349912742942 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Make signature module unconditionalChristian Tismer2018-08-273-17/+25
| | | | | | | | | | | | | After the signature module has been around for quite a while, there is no longer a reason to leave it optional. At the same time, we set the minimum Python 3 version to 3.5 . Some comments are reworked as well, but nothing real changed. Task-number: PYSIDE-510 Change-Id: I9e960f390d507d24bb45f7028838755fe23e751d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Enforce pure PyDict to be associated to VariantMapCristian Maureira-Fredes2018-08-231-1/+1
| | | | | | | | | | | | | | | | | Classes that implement the dictionary protocol needs to be treated as PyObject and not plain dictionaries, then we can properly transform PyDicts to Variant Maps. The reason behind this is that it seems that the PyDict_Check is too permisive and allow objects that are not proper dictionaries. The default case by any other Sequence-like object will be a PyObject. Task-number: PYSIDE-82 Change-Id: I86e8a29e5b8740f69c9c6f315e9d337e599bd333 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Implement Proper Name ManglingChristian Tismer2018-08-213-2/+122
| | | | | | | | | | | | | | | | | | | When types have attributes starting with two underscores but ending with at most one, Python uses name mangling to create a unique private variable. PySide needs to obey this rule in the tp_getattro methods. We implemented it as an optimized _Pep_PrivateMangle function that solves the problem internally without exposing the _Py_Mangle function. Remark: I think the exclusion of the _Py_Mangle function is another oversight in the Limited API. Task-number: PYSIDE-772 Change-Id: I0bfc2418dae439e963a16e37443f2099c6980696 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove wrong ownership transferCristian Maureira-Fredes2018-08-161-5/+0
| | | | | | Task-number: PYSIDE-781 Change-Id: Ifd2ecbfe869e8739bfe91d17349a80c36b2823a5 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* QtLocation: add missing enumsCristian Maureira-Fredes2018-08-101-2/+6
| | | | | | | Task-number: PYSIDE-487 Change-Id: I182156694d085c9a021a982b2d71ae1f25fbb9a8 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtDataVisualization: add ownership transfersCristian Maureira-Fredes2018-08-091-10/+302
| | | | | | Task-number: PYSIDE-487 Change-Id: Icfb707a3f50a7a2040946714049fa2aa178f0f0f Reviewed-by: Christian Tismer <tismer@stackless.com>
* Qt3DRender: add missing classesCristian Maureira-Fredes2018-08-081-6/+14
| | | | | | Task-number: PYSIDE-487 Change-Id: I3a6bc2d9b44844365932c52567bbecca5c0ef516 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Replace PySequence by PyList typeCristian Maureira-Fredes2018-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Most of the issues that we have in the past were because the broad scope of PySequence. Precisely, inside the QVariant conversion related to PySequence we just deal with 'lists', then having a Sequence is too broad and misleading. The problem related to this task number was due to the wrongly assumption that a Python class that implements the sequence protocol is a list, and it's not. With this change, we verify after the PyDict case if the element is a PyList, and the last default case will be PyObject. Thus, a custom class that implements the sequence protocol is nothing else than a PySequence, not a list. I'm uncertain if we really want to also have a case for PyTuple or any other Sequence-like type. Task-number: PYSIDE-726 Change-Id: I586ba725200acf910cf7b8c01002914984f06b5d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Invert return tuple order in QFont dialogsCristian Maureira-Fredes2018-08-072-2/+21
| | | | | | | | | | | The return order was wrong, and since it is based in templates used by other methods, a new template needed to be created. Task-number: PYSIDE-755 Change-Id: I905529844063f7e913f264e68cfceb6ce7b45358 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide2/QtGui: Fix build of Debian/armel,armh (OpenGL ES 2)Friedemann Kleint2018-08-061-4/+11
| | | | | | | | | Add optional class checks to QtGui and use them for QOpenGLTimeMonitor and QOpenGLTimerQuery. Task-number: PYSIDE-764 Change-Id: Ib33ec1d64c40f53aa31059e4ca9422707636375d Reviewed-by: Christian Tismer <tismer@stackless.com>
* Doc: Remove third-pary license text and link to the Qt licenses pageVenugopal Shivashankar2018-08-063-36/+5
| | | | | | | | | | | | This avoids duplicating license information for third-party sources used by Qt. The lincence info. for such sources are listed in the Qt documentation, so a link to it from the Qt for Python doc is a better alternative. Task-number: PYSIDE-758 Change-Id: I4efd0b2b8cce5dd76ddc98c80d1ac5cd385c7398 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Pep 384 Final Cut: Remove PepTypeChristian Tismer2018-07-2317-57/+57
| | | | | | | | | | | | | | | | | | | | | | | | | While trying to document the Limited API Project, it suddenly struck me: We can make the patch much much simpler and implement it without the necessity to have an extra PepType! Now I am happy to continue the documentation, because it is now no more improvable. This version will last as long as the layout of PyTypeObject does not change substantially. When that happens, then we need to rewrite stuff with the according PyType_GetSlot() access functions. These access functions will until then be complete enough so that we can live without the tricks like inventing a reduced PyTypeObject as was done in the current implementation. Task-number: PYSIDE-560 Change-Id: I49849cc377baa6794a5b53292691e21d6e2853ab Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Add snippet override for QQuickViewVenugopal Shivashankar2018-07-191-0/+67
| | | | | Change-Id: I051ddcc61904f293ed0f21173e040f8c89e2232e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Remove repetitive text in the licenses pageVenugopal Shivashankar2018-07-191-4/+0
| | | | | Change-Id: Ide68c9045413f26ad7d7fc781aef03d61ea99179 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Generate fully Qualified Names for FlagsChristian Tismer2018-07-161-2/+2
| | | | | | | | | The flags structure should give correct full names. See the doc in the issue tracker. Task-number: PYSIDE-747 Change-Id: I6b5c602566d3e4b8a2a93e2522e92da956578b18 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Add doc config for the QtQml moduleVenugopal Shivashankar2018-07-101-0/+5
| | | | | | | | This enables qdoc to include the content from the QtQml module page. Change-Id: I889e7918ae33cdc7d11f08a7e68a97c123fa05cc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Adapt Licenses to Python 3.7.0Christian Tismer2018-07-097-5619/+44
| | | | | | | | | | | Certain Python files were no longer used when moved to Python 3.7.0 . To finish that, these files are now also removed from the source. As a consequence, qt-attribution files needed to be changed. I took the chance to also update the license files to the new version. Change-Id: If058d1013f1d8cb937ee0305a5eb21ae2ebdd4e0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix Limited API and Signature Glitches in Python 3.7Christian Tismer2018-07-093-6/+5
| | | | | | | | | | | | | | | | | When the homebrew version of Python 3.7 appeared so unforeseen early, I felt inclined to fix these glitches, immediately: In Python 3.7, the typing module was more changed than expected. Since we don't support versions below 3.5, it was easy to fix by avoiding to copy typing.py for version 3.x, altogether. It stays there for Python 2.7 . Furthermore, the Python issue 33738 will later be solved than the code expected, so I fixed that one for all by a macro definition. Task-number: PYSIDE-741 Change-Id: Ia56ccd1ef20cb9536b1d39f190e011e5dccf1f22 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add missing ownership handling for QtChartsCristian Maureira-Fredes2018-07-061-5/+136
| | | | | | | | | | | | | Many classes have special methods that need to properly handle ownership of different charts, series, etc, but they were not properly handled. Now all the cases are covered, so one can easily port any QtCharts/C++ example to PySide. Task-number: PYSIDE-738 Change-Id: I5db94c4362ac1f5bf2e563ff99aa62662a30c176 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove Py_TPFLAGS_HAVE_VERSION_TAG in Python 3Boxiang Sun2018-07-052-0/+66
| | | | | | | | | | | | | The Py_TPFLAGS_DEFAULT in Python 3 has the Py_TPFLAGS_HAVE_VERSION_TAG flag, which causes the type attribute cache in _PyType_Lookup. According to the Shiboken implementation for Python 2, this is not we expected. So remove the Py_TPFLAGS_HAVE_VERSION_TAG flag from Py_TPFLAGS_DEFAULT in Python 3. Task-number: PYSIDE-60 Change-Id: Id731a59b65640eb5adea56fe06e0deb58ac4a168 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add test case for QVariant/PySequence issueCristian Maureira-Fredes2018-07-041-8/+34
| | | | | | | | | | Simple test to see if the current implementation is working in all the platforms Task-number: PYSIDE-641 Change-Id: I85f19979b84314d42deb6686f2cdb29ba6af079c Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add test for "Segfault when emitting string with emoji"Christian Tismer2018-07-042-0/+79
| | | | | | | | | | | | | The used constant was encoded directly as a unicode literal. This was the same possible in Python 2 and 3 due to https://www.python.org/dev/peps/pep-0414/ . Note that the emoji character creates a 1 or 2 codepoints long constant because Python 2 can be built with UCS-4 or UCS-2. Task-number: PYSIDE-336 Change-Id: Icc7ea664cf64f9e53ef5f7696c56c6470f7ada4a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Implement proper slice assignment for QByteArrayBoxiang Sun2018-07-023-40/+249
| | | | | | | | | | | | | | | | | | | Index assignment now only accept str/bytes, bytearray, QByteArray with size 1; Slice assignment only accept str/bytes, bytearray, QByteArray with limitation, that is if the step is not 1, then the number slots and the size of the target value must be equal. Range delete: a[2:5] = None Shrink: value length smaller than the slot length of the slice Expanse: value length bigger than the slot length of the slice Range assignment with step: a[2:5:1] = ... Range assignment with step which bigger than 1: a[2:9:2] = ... Range assignment with native step: a[5:2:-1] Change-Id: Ib9b929d09a691ed18c91e0c1c6b5dde827bf8d42 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Change deprecated header qtest_global.hCristian Maureira-Fredes2018-07-021-1/+1
| | | | | | | | The proper header is QtTest/qttestglobal.h Change-Id: Ifaa57bbca39552fbaa87e317989f0e49a4442dd1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Implement proper convert from QString to PyUnicodeObjectBoxiang Sun2018-06-291-5/+2
| | | | | | Task-number: PYSIDE-336 Change-Id: Ie7d955b3b4d35e24a9eac5e7958ce2077370a34b Reviewed-by: Christian Tismer <tismer@stackless.com>
* Doc: Add the snippets for QtUiTools and QtChartsVenugopal Shivashankar2018-06-292-0/+96
| | | | | Change-Id: I13d72daba91e608ede9498b04044bf048834f321 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Create registry files for 5.11Christian Tismer2018-06-293-0/+55760
| | | | | | | | | Update of the signature registry files for 5.11 . This works now in a single go, because the missing files are generated as a flaky test. Change-Id: I455eba83ae8b81ce97d5d7bcc41e7ff98c5be8bd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Update doc config to enable conditional exclusionVenugopal Shivashankar2018-06-281-0/+3
| | | | | | | | | | This should help excluding parts of qt documentation that are not relevant for Qt for Python. For example, the \snippet entries that include qmake project file statements. Change-Id: Iec05be72b1400ecb61a109688aaa9e3bf19e95b5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* existence_test.py: Make multi signature mismatch message more verboseFriedemann Kleint2018-06-261-2/+12
| | | | | | | | | It now looks like: multi-signature count mismatch for 'QOpenGLShaderProgram.setAttributeArray'. Actual 10 [ (int,PySide2.QtGui.QVector2D,int) (int,PySide2.QtGui.QVector3D,int) (int,PySide2.QtGui.QVector4D,int) (int,float,int,int) (int,int,int,int,int) (str,PySide2.QtGui.QVector2D,int) (str,PySide2.QtGui.QVector3D,int) (str,PySide2.QtGui.QVector4D,int) (str,float,int,int) (str,int,int,int,int)] vs. expected 4 [ (int,float,int,int) (int,int,int,int,int) (str,float,int,int) (str,int,int,int,int)]') Change-Id: I6c99e1fceeeb1647c8b3b291564190b9a2c0dd32 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>