diff options
Diffstat (limited to 'sources/pyside2/PySide2')
-rw-r--r-- | sources/pyside2/PySide2/QtCore/glue/qbytearray_msetitem.cpp | 158 | ||||
-rw-r--r-- | sources/pyside2/PySide2/QtCore/typesystem_core_common.xml | 204 | ||||
-rw-r--r-- | sources/pyside2/PySide2/QtQml/typesystem_qml.xml | 5 | ||||
-rw-r--r-- | sources/pyside2/PySide2/QtWebEngine/CMakeLists.txt | 32 | ||||
-rw-r--r-- | sources/pyside2/PySide2/QtWebEngine/typesystem_webengine.xml | 45 | ||||
-rw-r--r-- | sources/pyside2/PySide2/__init__.py.in | 6 | ||||
-rw-r--r-- | sources/pyside2/PySide2/_config.py.in | 2 | ||||
-rw-r--r-- | sources/pyside2/PySide2/pysideqtesttouch.h | 2 | ||||
-rw-r--r-- | sources/pyside2/PySide2/support/signature/mapping.py | 1 |
9 files changed, 402 insertions, 53 deletions
diff --git a/sources/pyside2/PySide2/QtCore/glue/qbytearray_msetitem.cpp b/sources/pyside2/PySide2/QtCore/glue/qbytearray_msetitem.cpp new file mode 100644 index 000000000..6745fc964 --- /dev/null +++ b/sources/pyside2/PySide2/QtCore/glue/qbytearray_msetitem.cpp @@ -0,0 +1,158 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt for Python. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +if (PyIndex_Check(_key)) { + Py_ssize_t _i = PyNumber_AsSsize_t(_key, PyExc_IndexError); + if (_i == -1 && PyErr_Occurred()) + return -1; + + if (_i < 0) + _i += %CPPSELF.count(); + + if (_i < 0 || _i >= %CPPSELF.size()) { + PyErr_SetString(PyExc_IndexError, "QByteArray index out of range"); + return -1; + } + + // Provide more specific error message for bytes/str, bytearray, QByteArray respectively +#ifdef IS_PY3K + if (PyBytes_Check(_value)) { + if (Py_SIZE(_value) != 1) { + PyErr_SetString(PyExc_ValueError, "bytes must be of size 1"); +#else + if (PyString_CheckExact(_value)) { + if (Py_SIZE(_value) != 1) { + PyErr_SetString(PyExc_ValueError, "str must be of size 1"); +#endif + return -1; + } + } else if (PyByteArray_Check(_value)) { + if (Py_SIZE(_value) != 1) { + PyErr_SetString(PyExc_ValueError, "bytearray must be of size 1"); + return -1; + } + } else if (PepType(Py_TYPE(_value)) == PepType(SbkPySide2_QtCoreTypes[SBK_QBYTEARRAY_IDX])) { + if (PyObject_Length(_value) != 1) { + PyErr_SetString(PyExc_ValueError, "QByteArray must be of size 1"); + return -1; + } + } else { +#ifdef IS_PY3K + PyErr_SetString(PyExc_ValueError, "a bytes, bytearray, QByteArray of size 1 is required"); +#else + PyErr_SetString(PyExc_ValueError, "a str, bytearray, QByteArray of size 1 is required"); +#endif + return -1; + } + + // Not support int or long. + %CPPSELF.remove(_i, 1); + PyObject *args = Py_BuildValue("(nO)", _i, _value); + PyObject *result = Sbk_QByteArrayFunc_insert(self, args); + Py_DECREF(args); + Py_XDECREF(result); + return !result ? -1 : 0; +} else if (PySlice_Check(_key)) { + Py_ssize_t start, stop, step, slicelength, value_length; + +#ifdef IS_PY3K + PyObject *key = _key; +#else + PySliceObject *key = reinterpret_cast<PySliceObject *>(_key); +#endif + if (PySlice_GetIndicesEx(key, %CPPSELF.count(), &start, &stop, &step, &slicelength) < 0) { + return -1; + } + // The parameter candidates are: bytes/str, bytearray, QByteArray itself. + // Not support iterable which contains ints between 0~255 + + // case 1: value is NULL, means delete the items within the range + // case 2: step is 1, means shrink or expanse + // case 3: step is not 1, then the number of slots have to equal the number of items in _value + QByteArray ba; + if (_value == NULL || _value == Py_None) { + ba = QByteArray(); + value_length = 0; + } else if (!(PyBytes_Check(_value) || PyByteArray_Check(_value) || PepType(Py_TYPE(_value)) == PepType(SbkPySide2_QtCoreTypes[SBK_QBYTEARRAY_IDX]))) { + PyErr_Format(PyExc_TypeError, "bytes, bytearray or QByteArray is required, not %.200s", PepType(Py_TYPE(_value))->tp_name); + return -1; + } else { + value_length = PyObject_Length(_value); + } + + if (step != 1 && value_length != slicelength) { + PyErr_Format(PyExc_ValueError, "attempt to assign %s of size %d to extended slice of size %d",PepType(Py_TYPE(_value))->tp_name, value_length, slicelength); + return -1; + } + + if (step != 1) { + int i = start; + for (int j = 0; j < slicelength; j++) { + PyObject *item = PyObject_GetItem(_value, PyLong_FromLong(j)); + QByteArray temp; +#ifdef IS_PY3K + if (PyLong_Check(item)) { +#else + if (PyLong_Check(item) || PyInt_Check(item)) { +#endif + int overflow; + long ival = PyLong_AsLongAndOverflow(item, &overflow); + // Not suppose to bigger than 255 because only bytes, bytearray, QByteArray were accept + const char *el = reinterpret_cast<const char*>(&ival); + temp = QByteArray(el); + } else { + temp = %CONVERTTOCPP[QByteArray](item); + } + + %CPPSELF.replace(i, 1, temp); + i += step; + } + return 0; + } else { + ba = %CONVERTTOCPP[QByteArray](_value); + %CPPSELF.replace(start, slicelength, ba); + return 0; + } +} else { + PyErr_Format(PyExc_TypeError, "QBytearray indices must be integers or slices, not %.200s", + PepType(Py_TYPE(_key))->tp_name); + return -1; +} + + diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml index ed577b098..cc63c0b7a 100644 --- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml +++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml @@ -44,6 +44,7 @@ <custom-type name="str" /> <custom-type name="PyBytes" /> + <custom-type name="PyByteArray" /> <custom-type name="PyCallable" /> <custom-type name="PyObject" /> <custom-type name="PySequence" /> @@ -282,11 +283,8 @@ <include file-name="QString" location="global"/> <conversion-rule> <native-to-target> - const int N = %in.length(); - wchar_t *str = new wchar_t[N]; - %in.toWCharArray(str); - PyObject *%out = PyUnicode_FromWideChar(str, N); - delete[] str; + QByteArray ba = %in.toUtf8(); + PyObject *%out = PyUnicode_FromStringAndSize(ba.constData(), ba.size()); return %out; </native-to-target> <target-to-native> @@ -429,7 +427,8 @@ %out = ret.isValid() ? ret : QVariant::fromValue<PySide::PyObjectWrapper>(%in); </add-conversion> <add-conversion type="PySequence"> - %out = QVariant_convertToVariantList(%in); + QVariant ret = QVariant_convertToVariantList(%in); + %out = ret.isValid() ? ret : QVariant::fromValue<PySide::PyObjectWrapper>(%in); </add-conversion> <add-conversion type="PyObject"> // Is a shiboken type not known by Qt @@ -479,8 +478,12 @@ } static QVariant QVariant_convertToValueList(PyObject *list) { - if (PySequence_Size(list) < 1) - return QVariant(); + if (PySequence_Size(list) < 0) { + // clear the error if < 0 which means no length at all + PyErr_Clear(); + return QVariant(); + } + Shiboken::AutoDecRef element(PySequence_GetItem(list, 0)); int typeId; const char *typeName = QVariant_resolveMetaType(element.cast<PyTypeObject*>(), &typeId); @@ -504,14 +507,26 @@ static bool QVariant_isStringList(PyObject *list) { bool allString = true; - Shiboken::AutoDecRef fast(PySequence_Fast(list, "Failed to convert QVariantList")); - Py_ssize_t size = PySequence_Fast_GET_SIZE(fast.object()); - for (int i = 0; i < size; ++i) { - PyObject *item = PySequence_Fast_GET_ITEM(fast.object(), i); - if (!%CHECKTYPE[QString](item)) { - allString = false; - break; + + if (PySequence_Check(list)) { + if (PySequence_Size(list) < 0) { + // clear the error if < 0 which means no length at all + PyErr_Clear(); + return false; + } + Shiboken::AutoDecRef fast(PySequence_Fast(list, "Failed to convert QVariantList")); + Py_ssize_t size = PySequence_Fast_GET_SIZE(fast.object()); + for (int i = 0; i < size; ++i) { + PyObject *item = PySequence_Fast_GET_ITEM(fast.object(), i); + if (!%CHECKTYPE[QString](item)) { + allString = false; + break; + } } + } else { + // If it is not a list or a derived list class + // we assume that will not be a String list neither. + allString = false; } return allString; } @@ -540,6 +555,13 @@ QVariant valueList = QVariant_convertToValueList(list); if (valueList.isValid()) return valueList; + + if (PySequence_Size(list) < 0) { + // clear the error if < 0 which means no length at all + PyErr_Clear(); + return QVariant(); + } + QList<QVariant> lst; Shiboken::AutoDecRef fast(PySequence_Fast(list, "Failed to convert QVariantList")); Py_ssize_t size = PySequence_Fast_GET_SIZE(fast.object()); @@ -2501,14 +2523,19 @@ <add-conversion type="Py_None"> %out = %OUTTYPE(); </add-conversion> - <add-conversion type="PyString" check="Shiboken::String::check(%in)"> - %out = %OUTTYPE(Shiboken::String::toCString(%in), Shiboken::String::len(%in)); - </add-conversion> <add-conversion type="PyBytes"> #ifdef IS_PY3K %out = %OUTTYPE(PyBytes_AS_STRING(%in), PyBytes_GET_SIZE(%in)); + #else + %out = %OUTTYPE(Shiboken::String::toCString(%in), Shiboken::String::len(%in)); #endif </add-conversion> + <add-conversion type="PyByteArray"> + %out = %OUTTYPE(PyByteArray_AsString(%in), PyByteArray_Size(%in)); + </add-conversion> + <add-conversion type="PyString" check="Shiboken::String::check(%in) && !PyUnicode_Check(%in)"> + %out = %OUTTYPE(Shiboken::String::toCString(%in), Shiboken::String::len(%in)); + </add-conversion> </target-to-native> </conversion-rule> @@ -2569,47 +2596,108 @@ <modify-function signature="operator+(QByteArray,const char*)" remove="all" /> <modify-function signature="operator+(QString,QByteArray)" remove="all" /> <modify-function signature="operator+(QByteArray,QString)" remove="all" /> - <add-function signature="operator+(PyUnicode)"> + <add-function signature="operator+(PyBytes,QByteArray)"> <inject-code> - Shiboken::AutoDecRef str(PyUnicode_AsASCIIString(%PYARG_1)); - if (!str.isNull()) { - QByteArray b(PyBytes_AS_STRING(str.object()), PyBytes_GET_SIZE (str.object())); - b.prepend(*%CPPSELF); - %PYARG_0 = %CONVERTTOPYTHON[QByteArray](b); - } + QByteArray ba = QByteArray(PyBytes_AS_STRING(%PYARG_1), PyBytes_GET_SIZE(%PYARG_1)) + *%CPPSELF; + %PYARG_0 = %CONVERTTOPYTHON[QByteArray](ba); </inject-code> </add-function> - <add-function signature="operator+(PyUnicode,QByteArray)"> + <add-function signature="operator+(PyByteArray, QByteArray)" return-type="QByteArray"> <inject-code> - Shiboken::AutoDecRef str(PyUnicode_AsASCIIString(%PYARG_1)); - if (!str.isNull()) { - QByteArray b(PyBytes_AS_STRING(str.object()), PyBytes_GET_SIZE(str.object())); - b.append(*%CPPSELF); - %PYARG_0 = %CONVERTTOPYTHON[QByteArray](b); - } + QByteArray ba = QByteArray(PyByteArray_AsString(%PYARG_1), PyByteArray_Size(%PYARG_1)) + *%CPPSELF; + %PYARG_0 = %CONVERTTOPYTHON[QByteArray](ba); </inject-code> </add-function> - <add-function signature="operator+(PyBytes,QByteArray)"> + <add-function signature="operator+(PyByteArray)" return-type="QByteArray"> <inject-code> - QByteArray ba = QByteArray(PyBytes_AS_STRING(%PYARG_1), PyBytes_GET_SIZE(%PYARG_1)) + *%CPPSELF; + QByteArray ba = *%CPPSELF + QByteArray(PyByteArray_AsString(%PYARG_1), PyByteArray_Size(%PYARG_1)); %PYARG_0 = %CONVERTTOPYTHON[QByteArray](ba); </inject-code> </add-function> + <add-function signature="operator+=(PyByteArray)" return-type="QByteArray"> + <inject-code> + *%CPPSELF += QByteArray(PyByteArray_AsString(%PYARG_1), PyByteArray_Size(%PYARG_1)); + </inject-code> + </add-function> + <add-function signature="operator==(PyUnicode)"> + <inject-code> + if (PyUnicode_CheckExact(%PYARG_1)) { + Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1)); + QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object())); + bool cppResult = %CPPSELF == ba; + %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult); + } + </inject-code> + </add-function> + <add-function signature="operator!=(PyUnicode)"> + <inject-code> + if (PyUnicode_CheckExact(%PYARG_1)) { + Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1)); + QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object())); + bool cppResult = %CPPSELF != ba; + %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult); + } + </inject-code> + </add-function> + <add-function signature="operator>(PyUnicode)"> + <inject-code> + if (PyUnicode_CheckExact(%PYARG_1)) { + Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1)); + QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object())); + bool cppResult = %CPPSELF > ba; + %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult); + } + </inject-code> + </add-function> + <add-function signature="operator>=(PyUnicode)"> + <inject-code> + if (PyUnicode_CheckExact(%PYARG_1)) { + Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1)); + QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object())); + bool cppResult = %CPPSELF >= ba; + %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult); + } + </inject-code> + </add-function> + <add-function signature="operator<(PyUnicode)"> + <inject-code> + if (PyUnicode_CheckExact(%PYARG_1)) { + Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1)); + QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object())); + bool cppResult = %CPPSELF < ba; + %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult); + } + </inject-code> + </add-function> + <add-function signature="operator<=(PyUnicode)"> + <inject-code> + if (PyUnicode_CheckExact(%PYARG_1)) { + Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1)); + QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object())); + bool cppResult = %CPPSELF <= ba; + %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult); + } + </inject-code> + </add-function> <!-- ### --> <add-function signature="__repr__" return-type="PyObject*"> <inject-code class="target" position="beginning"> - QByteArray b(PepType(Py_TYPE(%PYSELF))->tp_name); - PyObject *aux = Shiboken::String::fromStringAndSize(%CPPSELF.constData(), %CPPSELF.size()); - if (PyUnicode_CheckExact(aux)) { - PyObject *tmp = PyUnicode_AsASCIIString(aux); - Py_DECREF(aux); - aux = tmp; + PyObject *aux = PyBytes_FromStringAndSize(%CPPSELF.constData(), %CPPSELF.size()); + if (aux == NULL) { + return NULL; } - b += "('"; - b += QByteArray(PyBytes_AS_STRING(aux), PyBytes_GET_SIZE(aux)); - b += "')"; - %PYARG_0 = Shiboken::String::fromStringAndSize(b.constData(), b.size()); + QByteArray b(PepType(Py_TYPE(%PYSELF))->tp_name); + #ifdef IS_PY3K + %PYARG_0 = PyUnicode_FromFormat("%s(%R)", b.constData(), aux); + #else + aux = PyObject_Repr(aux); + b += "("; + b += QByteArray(PyBytes_AS_STRING(aux), PyBytes_GET_SIZE(aux)); + b += ")"; + %PYARG_0 = Shiboken::String::fromStringAndSize(b.constData(), b.size()); + #endif + Py_DECREF(aux); </inject-code> </add-function> @@ -2626,14 +2714,21 @@ <inject-code class="target" position="beginning"> if (PyBytes_Check(%PYARG_1)) { %0 = new QByteArray(PyBytes_AsString(%PYARG_1), PyBytes_GET_SIZE(%PYARG_1)); - } else if (PyUnicode_CheckExact(%PYARG_1)) { - Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1)); - %0 = new QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object())); } else if (Shiboken::String::check(%PYARG_1)) { %0 = new QByteArray(Shiboken::String::toCString(%PYARG_1), Shiboken::String::len(%PYARG_1)); } </inject-code> </modify-function> + <add-function signature="QByteArray(PyByteArray)" allow-thread="yes">> + <inject-code class="target" position="beginning"> + %0 = new QByteArray(PyByteArray_AsString(%PYARG_1), PyByteArray_Size(%PYARG_1)); + </inject-code> + </add-function> + <add-function signature="QByteArray(PyBytes)" allow-thread="yes"> + <inject-code class="target" position="beginning"> + %0 = new QByteArray(PyBytes_AS_STRING(%PYARG_1), PyBytes_GET_SIZE(%PYARG_1)); + </inject-code> + </add-function> <!-- buffer protocol --> <inject-code class="native" position="beginning" file="glue/qbytearray_bufferprotocol.cpp" /> <inject-code class="target" position="end"> @@ -2664,6 +2759,7 @@ <modify-function signature="number(uint,int)" remove="all"/> <modify-function signature="number(qulonglong,int)" remove="all"/> <modify-function signature="operator+=(const char*)" remove="all"/> + <modify-function signature="operator+(char,QByteArray)" remove="all"/> <modify-function signature="operator==(const char*,QByteArray)" remove="all" /> <modify-function signature="operator!=(const char*,QByteArray)" remove="all" /> <modify-function signature="operator<(const char*,QByteArray)" remove="all" /> @@ -2789,7 +2885,16 @@ </modify-function> <add-function signature="__str__" return-type="PyObject*"> <inject-code class="target" position="beginning"> - %PYARG_0 = Shiboken::String::fromStringAndSize(%CPPSELF.constData(), %CPPSELF.size()); + PyObject *aux = PyBytes_FromStringAndSize(%CPPSELF.constData(), %CPPSELF.size()); + if (aux == NULL) { + return NULL; + } + #ifdef IS_PY3K + %PYARG_0 = PyObject_Repr(aux); + Py_DECREF(aux); + #else + %PYARG_0 = aux; + #endif </inject-code> </add-function> <add-function signature="__len__"> @@ -2823,6 +2928,9 @@ return !result ? -1 : 0; </inject-code> </add-function> + <add-function signature="__msetitem__"> + <inject-code class="target" position="beginning" file="glue/qbytearray_msetitem.cpp" /> + </add-function> </value-type> <value-type name="QTextBoundaryFinder"> <enum-type name="BoundaryReason" flags="BoundaryReasons"/> diff --git a/sources/pyside2/PySide2/QtQml/typesystem_qml.xml b/sources/pyside2/PySide2/QtQml/typesystem_qml.xml index 80a0ed826..4ca776e11 100644 --- a/sources/pyside2/PySide2/QtQml/typesystem_qml.xml +++ b/sources/pyside2/PySide2/QtQml/typesystem_qml.xml @@ -121,6 +121,11 @@ </object-type> <object-type name="QQmlEngine"> <enum-type name="ObjectOwnership" /> + <modify-function signature="addImageProvider(const QString&,QQmlImageProviderBase*)"> + <modify-argument index="2"> + <define-ownership owner="c++"/> + </modify-argument> + </modify-function> </object-type> <object-type name="QQmlExpression"> <modify-function signature="evaluate(bool*)" allow-thread="yes"> diff --git a/sources/pyside2/PySide2/QtWebEngine/CMakeLists.txt b/sources/pyside2/PySide2/QtWebEngine/CMakeLists.txt new file mode 100644 index 000000000..9029509ee --- /dev/null +++ b/sources/pyside2/PySide2/QtWebEngine/CMakeLists.txt @@ -0,0 +1,32 @@ +project(QtWebEngine) + +set(QtWebEngine_SRC +${QtWebEngine_GEN_DIR}/qtwebengine_wrapper.cpp +# module is always needed +${QtWebEngine_GEN_DIR}/qtwebengine_module_wrapper.cpp +) + +set(QtWebEngine_include_dirs + ${QtWebEngine_SOURCE_DIR} + ${QtWebEngine_BINARY_DIR} + ${Qt5Core_INCLUDE_DIRS} + ${SHIBOKEN_INCLUDE_DIR} + ${libpyside_SOURCE_DIR} + ${SHIBOKEN_PYTHON_INCLUDE_DIR} + ${QtCore_GEN_DIR} + ) +set(QtWebEngine_libraries pyside2 + ${SHIBOKEN_PYTHON_LIBRARIES} + ${SHIBOKEN_LIBRARY} + ${Qt5WebEngine_LIBRARIES} + ${Qt5Core_LIBRARIES} + ) +set(QtWebEngine_deps QtCore) +create_pyside_module(QtWebEngine + QtWebEngine_include_dirs + QtWebEngine_libraries + QtWebEngine_deps + QtWebEngine_SOURCE_DIR + QtWebEngine_SRC + "") + diff --git a/sources/pyside2/PySide2/QtWebEngine/typesystem_webengine.xml b/sources/pyside2/PySide2/QtWebEngine/typesystem_webengine.xml new file mode 100644 index 000000000..9b38bc1e6 --- /dev/null +++ b/sources/pyside2/PySide2/QtWebEngine/typesystem_webengine.xml @@ -0,0 +1,45 @@ +<?xml version="1.0"?> +<!-- +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt for Python. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +--> +<typesystem package="PySide2.QtWebEngine"> + <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/> + <namespace-type name="QtWebEngine"/> +</typesystem> diff --git a/sources/pyside2/PySide2/__init__.py.in b/sources/pyside2/PySide2/__init__.py.in index f33b05e31..ab50ef776 100644 --- a/sources/pyside2/PySide2/__init__.py.in +++ b/sources/pyside2/PySide2/__init__.py.in @@ -2,7 +2,7 @@ __all__ = list("Qt" + body for body in "@all_module_shortnames@" .split(";")) __version__ = "@FINAL_PACKAGE_VERSION@" -__version_info__ = (@BINDING_API_MAJOR_VERSION@, @BINDING_API_MINOR_VERSION@, @BINDING_API_MICRO_VERSION@, "@BINDING_API_PRE_RELEASE_VERSION_TYPE@", @BINDING_API_PRE_RELEASE_VERSION@) +__version_info__ = (@BINDING_API_MAJOR_VERSION@, @BINDING_API_MINOR_VERSION@, @BINDING_API_MICRO_VERSION@, "@BINDING_API_PRE_RELEASE_VERSION_TYPE@", "@BINDING_API_PRE_RELEASE_VERSION@") @PYSIDE_BUILD_DATE@ @PYSIDE_BUILD_COMMIT_DATE@ @@ -24,7 +24,7 @@ def _setupQtDirectories(): # PATH has to contain the package directory, otherwise plugins # won't be able to find their required Qt libraries (e.g. the # svg image plugin won't find Qt5Svg.dll). - os.environ['PATH'] = pyside_package_dir + ";" + os.environ['PATH'] + os.environ['PATH'] = pyside_package_dir + os.pathsep + os.environ['PATH'] # On Windows add the PySide2\openssl folder (if it exists) to # the PATH so that the SSL DLLs can be found when Qt tries to @@ -34,7 +34,7 @@ def _setupQtDirectories(): if os.path.exists(openssl_dir): path = os.environ['PATH'] try: - os.environ['PATH'] = os.path.join(openssl_dir, path) + os.environ['PATH'] = openssl_dir + os.pathsep + path try: from . import QtNetwork except ImportError: diff --git a/sources/pyside2/PySide2/_config.py.in b/sources/pyside2/PySide2/_config.py.in index 6f8d022dc..31a2f7a50 100644 --- a/sources/pyside2/PySide2/_config.py.in +++ b/sources/pyside2/PySide2/_config.py.in @@ -6,7 +6,7 @@ shiboken_library_soversion = str(@SHIBOKEN_SO_VERSION@) pyside_library_soversion = str(@PYSIDE_SO_VERSION@) version = "@FINAL_PACKAGE_VERSION@" -version_info = (@BINDING_API_MAJOR_VERSION@, @BINDING_API_MINOR_VERSION@, @BINDING_API_MICRO_VERSION@, "@BINDING_API_PRE_RELEASE_VERSION_TYPE@", @BINDING_API_PRE_RELEASE_VERSION@) +version_info = (@BINDING_API_MAJOR_VERSION@, @BINDING_API_MINOR_VERSION@, @BINDING_API_MICRO_VERSION@, "@BINDING_API_PRE_RELEASE_VERSION_TYPE@", "@BINDING_API_PRE_RELEASE_VERSION@") @PYSIDE_BUILD_DATE@ @PYSIDE_BUILD_COMMIT_DATE@ diff --git a/sources/pyside2/PySide2/pysideqtesttouch.h b/sources/pyside2/PySide2/pysideqtesttouch.h index 4c412c75a..60d3bbe25 100644 --- a/sources/pyside2/PySide2/pysideqtesttouch.h +++ b/sources/pyside2/PySide2/pysideqtesttouch.h @@ -40,7 +40,7 @@ #ifndef PYSIDEQTESTTOUCH_H #define PYSIDEQTESTTOUCH_H -#include <QtTest/qtest_global.h> +#include <QtTest/qttestglobal.h> #include <QtTest/qtestassert.h> #include <QtTest/qtestsystem.h> #include <QtTest/qtestspontaneevent.h> diff --git a/sources/pyside2/PySide2/support/signature/mapping.py b/sources/pyside2/PySide2/support/signature/mapping.py index b8ef3761c..3e05dbcb2 100644 --- a/sources/pyside2/PySide2/support/signature/mapping.py +++ b/sources/pyside2/PySide2/support/signature/mapping.py @@ -238,6 +238,7 @@ def init_QtCore(): "QDir.SortFlags(Name | IgnoreCase)": Instance( "QDir.SortFlags(QDir.Name | QDir.IgnoreCase)"), "PyBytes": bytes, + "PyByteArray": bytearray, "PyUnicode": Text, "signed long": int, "PySide2.QtCore.int": int, |