aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2
Commit message (Collapse)AuthorAgeFilesLines
* 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-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* 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>
* 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-291-0/+2
| | | | | | | | | | | 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>
* 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>
* 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>
* Pep 384 Final Cut: Remove PepTypeChristian Tismer2018-07-239-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* Implement proper slice assignment for QByteArrayBoxiang Sun2018-07-022-0/+164
| | | | | | | | | | | | | | | | | | | 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>
* Fix QVariant conversions when using PySequencesCristian Maureira-Fredes2018-06-211-10/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we transform QVariant arguments to internal types, starting from the Python ones, to others related to shiboken. After checking if the current object is a PyDict we proceed to check if it's a PySequence. PySequence is the complementary 'sequence-like' type of PyDict, and allows finite and infinite sequences, like lists or generators. The problem is that when one implements a class which includes the __getitem__ method, Python already thinks that it correspond to a PySequence, then we try to get the elements to transform into a QList<QVariant> but it fails at the first attempt. The solution was to not assume that all PySequences have finite length (or a length), and also to have a fallback case similarly to the PyDict treatment, wrapping the PyObject as a QVariant. Task-number: PYSIDE-641 Change-Id: I3b755f47ed076147024de38e5e0a86932d981f88 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix failing versioninfo_test when the version is not a pre-release oneAlexandru Croitor2018-06-082-2/+2
| | | | | | | | | | | | The test used to fail when pre-release version parts are empty (aka there is no "beta1" or "alpha2"). Make sure to always include at least an empty string when those version parts are not set, and adjust the test accordintly to check for a string. Change-Id: Ia30bb99de7f122456e132516346df4e3c0a1fa94 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Merge branch '5.9' into 5.11Alexandru Croitor2018-06-083-2/+79
|\ | | | | | | Change-Id: I7e55b4f27f77e2333b9e0f4cddc8de4b89b6043b
| * Add bindings for QtWebEngine (aka Quick)Alexandru Croitor2018-06-072-0/+77
| | | | | | | | | | | | | | | | | | | | | | There is only one method we really need, QtWebEngine::initialize() which is used for all Qt Quick based WebEngine applications. Otherwise you get a warning upon startup of a Qt Quick WebEngine application, and this might lead to undefined behavior. Task-number: PYSIDE-688 Change-Id: I7de2bbb58c49cb2a41b0e13ffc9de6a3161f3960 Reviewed-by: Christian Tismer <tismer@stackless.com>
| * Fix openssl lib path not being properly set on WindowsAlexandru Croitor2018-06-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This lead to failure of importing PySide2, because on Windows __init__.py tried to load QtNetwork and that failed because it could't find the ssl libraries. This is a regression and amend of 87e85c460 . Task-number: PYSIDE-687 Change-Id: I298153b054baf5fa85b1831d88a99480c5c0a249 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge branch '5.9' into 5.11Alexandru Croitor2018-06-073-33/+120
|\| | | | | | | Change-Id: I2de0fe8456fca242c56ea28520126f9ebbf540d8
| * Fix addImageProvider ownership transferCristian Maureira-Fredes2018-06-071-0/+5
| | | | | | | | | | | | | | The QQmlEngine takes ownership of the QQmlImageProviderBase. Change-Id: Ia01e4151054623c96c24a2d07009d876eaacaa55 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Improve the QByteArray implementationBoxiang Sun2018-06-012-33/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The available constructors for QByteArray are now: bytes, bytearray, and QByteArray, unicode is not accepted anymore. Also the concatenation is now possible between QByteArrays. Even though is not possible to initialize a QByteArray with an unicode, we include the possibility to compare it with one (Compatibility with PyQt). The __repr__ and __str__ are now properly working. There seemed to be a confusion regarding data types between Shiboken, Python2 and Python3 related to bytes, so now the structure is based on the flag SBK_BYTES_NAME, which is define as "bytes" for Python3 and "str" for Python2. Many tests were modified to properly handle string, using the `py3kcompat` module. Task-number: PYSIDE-232 Change-Id: I8b671f367c60a0870c72dcbe5662106b3225037d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.11Friedemann Kleint2018-06-0119-179/+168
|\| | | | | | | Change-Id: I31a0ff26bc02e6cc2ec2a816c16d170fc334f800
| * Add missing API of QtWebEngineWidgetsDavid Rosca2018-06-012-10/+21
| | | | | | | | | | | | Change-Id: Ifafae9a5eac1844bf9057bc5e1f912e287499aa7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * PEP 384-squash: Implement PEP 384Christian Tismer2018-05-3017-169/+147
| | | | | | | | | | | | | | | | | | | | This is the condensed checkin of 18 commits which created the implementation of PEP 384. Task-number: PYSIDE-560 Change-Id: I834c659af4c2b55b268f8e8dc4cfa53f02502409 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.11Friedemann Kleint2018-05-264-2/+177
|\| | | | | | | Change-Id: I0c5b60263ed642a9b6f6b5d6a1492a11f278bfd5
| * Add QtScxmlFriedemann Kleint2018-05-242-0/+131
| | | | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: Ib8eb4a77f04ddbbe2c4b164b95f49e2f53bf44d9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Use SPDX name / ID for python licenseKai Koehne2018-05-222-2/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the standard name of the license. See also https://spdx.org/licenses/Python-2.0.html Note that there's some deviation in the actual license text: The text refers to the exact Python version. Also, the SPDX standardized license contains additional text for some modules. Still, it's better to use the standardized name than inventing our own one. Change-Id: I64b20bc558928ca28edaf81925a049fcaeb124b6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.11Friedemann Kleint2018-05-189-37/+188
|\| | | | | | | Change-Id: I20cf741f5b07426ad5113eb8c52f144102c331ce
| * Add more QtMultimedia classesFriedemann Kleint2018-05-162-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add QCameraFeedbackControl, QMediaService, QMediaServiceCameraInfoInterface, QMediaServiceDefaultDeviceInterface, QMediaServiceFeaturesInterface, QMediaServiceProviderHint, QMediaServiceSupportedDevicesInterface, QMediaServiceSupportedFormatsInterface, QMediaTimeInterval, QMediaVideoProbeControl, QMetaDataReaderControl and QMetaDataWriterControl. Add commented out classes QCameraFlashControl and QCameraFocusControl with explanatory comment. Task-number: PYSIDE-487 Change-Id: I4125ee2088bde487c36c3c13dd7b05d6667b0711 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Fix building PySide2 with ninjaAlexandru Croitor2018-05-161-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building PySide2 with the ninja generator, ninja prints an error: "ninja: error: build.ninja:18549: multiple rules generate ./sources/pyside2/pyside_version.py [-w dupbuild=err]" This seems like an interaction error between CMake and ninja, where file dependency paths are not canonicalized. In our case this happens due to usage of pyside_version.py's relative path. Fix is to use an absolute path. Task-number: PYSIDE-663 Change-Id: Iee2ae5ea483e59ee67e53e3a2059108bf8a34fbe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * QtGui: Remove duplicate entry for QAccessible, take 2Friedemann Kleint2018-05-151-12/+3
| | | | | | | | | | | | | | | | | | Join the remaining entries. Amends e8291778cd1bab2679033cecf3f756bb2d2935ab. Change-Id: I5bb0b129fc92158a16470fcab1826f7a6ea02203 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
| * Add default parameter to Q*ApplicationsCristian Maureira-Fredes2018-05-153-0/+24
| | | | | | | | | | | | | | | | | | | | | | When no arguments are passed, build an empty list and to start a QCoreApplication, QApplication and QGuiApplication. This is a small effort to include the idea of a default parameter from Python. Change-Id: Ieedc1e7ee17de996778aa2d0bddfb88c5ef208cf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Add QProxyStyleFriedemann Kleint2018-05-142-0/+8
| | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: Ib862be9c0c62be09a34c3a79740d147b9788cb34 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * QtGui: Remove duplicate entry for QAccessibleFriedemann Kleint2018-05-141-1/+0
| | | | | | | | | | | | | | Amends e8291778cd1bab2679033cecf3f756bb2d2935ab. Change-Id: I6aa0b153575cb1eac1912e5e1970d71a0a388501 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Add more QtWidget classesFriedemann Kleint2018-05-142-0/+15
| | | | | | | | | | | | | | | | Add QScroller, QScrollerProperties, QAccessibleWidget Task-number: PYSIDE-487 Change-Id: Ia0322715bd494c5f4102ed1180eb92eb49b441f7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Add more QtGui classesFriedemann Kleint2018-05-112-3/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add QAccessible, acccessibility events and interfaces. Fix the polymorphic-id-expression of the acccessibility events; they no longer inherit QEvent in Qt 5. Add QInputMethod, QInputMethodQueryEvent, QNativeGestureEvent, QScrollEvent, QScrollPrepareEvent, QOpenGLTextureBlitter and QPointingDeviceUniqueId. Task-number: PYSIDE-487 Change-Id: I609ece08cbab78d2fe75eaf6cb0b10531aac9b25 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Add more QtCore classesFriedemann Kleint2018-05-112-0/+14
| | | | | | | | | | | | | | | | | | Add QIdentityProxyModel, QLockFile, QMessageAuthenticationCode, OperatingSystemVersion and QSignalBlocker. Task-number: PYSIDE-487 Change-Id: I680c3d175394e9d560152a38195d015fc6abb7fa Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>