diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-03-02 14:12:29 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-03-10 11:19:07 +0100 |
commit | 8fc596368a67cd67f03e07a4ea8d7ac625ecebdb (patch) | |
tree | 3c187172e5523f485fc0a4ca8ec5cfdabb3110a9 /sources/pyside6 | |
parent | f7901b0b29e831a3799bd7fc39dbdf5e67271ae8 (diff) |
PySide6: Remove unused glue code
Change-Id: I3f5adb202722aecbd34766e782c218720926b73d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside6')
-rw-r--r-- | sources/pyside6/PySide6/CMakeLists.txt | 2 | ||||
-rw-r--r-- | sources/pyside6/PySide6/QtCore/typesystem_core_common.xml | 2 | ||||
-rw-r--r-- | sources/pyside6/PySide6/QtXml/typesystem_xml.xml | 1 | ||||
-rw-r--r-- | sources/pyside6/PySide6/glue/qtcore.cpp | 37 | ||||
-rw-r--r-- | sources/pyside6/PySide6/glue/qtgui.cpp | 5 | ||||
-rw-r--r-- | sources/pyside6/PySide6/glue/qtopengl.cpp | 74 | ||||
-rw-r--r-- | sources/pyside6/PySide6/glue/qtscript.cpp | 74 | ||||
-rw-r--r-- | sources/pyside6/PySide6/glue/qtwebkitwidgets.cpp | 92 | ||||
-rw-r--r-- | sources/pyside6/PySide6/glue/qtxml.cpp | 10 | ||||
-rw-r--r-- | sources/pyside6/PySide6/glue/qtxmlpatterns.cpp | 43 | ||||
-rw-r--r-- | sources/pyside6/PySide6/templates/webkitwidgets_common.xml | 73 | ||||
-rw-r--r-- | sources/pyside6/PySide6/templates/xml_common.xml | 58 |
12 files changed, 0 insertions, 471 deletions
diff --git a/sources/pyside6/PySide6/CMakeLists.txt b/sources/pyside6/PySide6/CMakeLists.txt index cd76db6f2..598cab6dd 100644 --- a/sources/pyside6/PySide6/CMakeLists.txt +++ b/sources/pyside6/PySide6/CMakeLists.txt @@ -100,7 +100,5 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/opengl_common.xml DESTINATION share/PySide6${pyside_SUFFIX}/typesystems) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/openglfunctions_common.xml DESTINATION share/PySide6${pyside_SUFFIX}/typesystems) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/xml_common.xml - DESTINATION share/PySide6${pyside_SUFFIX}/typesystems) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pyside6_global.h DESTINATION include/${BINDING_NAME}${pyside6_SUFFIX}) diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml index d0bb7ee32..69d519de2 100644 --- a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml +++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml @@ -239,8 +239,6 @@ </conversion-rule> </primitive-type> - <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="pystring-check"/> - <primitive-type name="QString" target-lang-api-name="PyUnicode"> <include file-name="QString" location="global"/> <conversion-rule> diff --git a/sources/pyside6/PySide6/QtXml/typesystem_xml.xml b/sources/pyside6/PySide6/QtXml/typesystem_xml.xml index 32b9dd0a6..1bc51d3f3 100644 --- a/sources/pyside6/PySide6/QtXml/typesystem_xml.xml +++ b/sources/pyside6/PySide6/QtXml/typesystem_xml.xml @@ -42,7 +42,6 @@ <typesystem package="PySide6.QtXml"> <load-typesystem name="QtCore/typesystem_core.xml" generate="no" /> <load-typesystem name="templates/core_common.xml" generate="no" /> - <load-typesystem name="templates/xml_common.xml" generate="no" /> <rejection class="QXmlAttributes::Attribute"/> <rejection class="QDomNode" field-name="impl"/> diff --git a/sources/pyside6/PySide6/glue/qtcore.cpp b/sources/pyside6/PySide6/glue/qtcore.cpp index 354dfa389..dcf08c4be 100644 --- a/sources/pyside6/PySide6/glue/qtcore.cpp +++ b/sources/pyside6/PySide6/glue/qtcore.cpp @@ -853,11 +853,6 @@ if (ret > 0 && ((strcmp(%1, SIGNAL(destroyed())) == 0) || (strcmp(%1, SIGNAL(des %PYARG_0 = %CONVERTTOPYTHON[int](ret); // @snippet qobject-receivers -// @snippet qregexp-replace -%1.replace(*%CPPSELF, %2); -%PYARG_0 = %CONVERTTOPYTHON[QString](%1); -// @snippet qregexp-replace - // @snippet qbytearray-mgetitem if (PyIndex_Check(_key)) { Py_ssize_t _i; @@ -1130,14 +1125,6 @@ QByteArray b(Py_TYPE(%PYSELF)->tp_name); Py_DECREF(aux); // @snippet qbytearray-repr -// @snippet qbytearray-1 -if (PyBytes_Check(%PYARG_1)) { - %0 = new QByteArray(PyBytes_AsString(%PYARG_1), PyBytes_GET_SIZE(%PYARG_1)); -} else if (Shiboken::String::check(%PYARG_1)) { - %0 = new QByteArray(Shiboken::String::toCString(%PYARG_1), Shiboken::String::len(%PYARG_1)); -} -// @snippet qbytearray-1 - // @snippet qbytearray-2 %0 = new QByteArray(PyByteArray_AsString(%PYARG_1), PyByteArray_Size(%PYARG_1)); // @snippet qbytearray-2 @@ -1154,11 +1141,6 @@ PepType_AS_BUFFER(Shiboken::SbkType<QByteArray>()) = &SbkQByteArrayBufferProc; %PYARG_0 = PyBytes_FromStringAndSize(%CPPSELF.%FUNCTION_NAME(), %CPPSELF.size()); // @snippet qbytearray-data -// @snippet qbytearray-fromrawdata -%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(PyBytes_AsString(%PYARG_1), PyBytes_GET_SIZE(%PYARG_1)); -%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0); -// @snippet qbytearray-fromrawdata - // @snippet qbytearray-str PyObject *aux = PyBytes_FromStringAndSize(%CPPSELF.constData(), %CPPSELF.size()); if (aux == nullptr) { @@ -1596,10 +1578,6 @@ Py_END_ALLOW_THREADS %out = %OUTTYPE(PyLong_AsLong(%in)); // @snippet conversion-pylong -// @snippet conversion-pylong-unsigned -%out = %OUTTYPE(PyLong_AsUnsignedLong(%in)); -// @snippet conversion-pylong-unsigned - // @snippet conversion-pylong-quintptr #if QT_POINTER_SIZE == 8 %out = %OUTTYPE(PyLong_AsUnsignedLongLong(%in)); @@ -1763,10 +1741,6 @@ return PyBytes_FromStringAndSize(%in.constData(), %in.size()); return PyLong_FromLong(%in); // @snippet return-pylong -// @snippet return-pylong-unsigned -return PyLong_FromUnsignedLong(%in); -// @snippet return-pylong-unsigned - // @snippet return-pylong-quintptr #if QT_POINTER_SIZE == 8 return PyLong_FromUnsignedLongLong(%in); @@ -1813,17 +1787,6 @@ PyErr_Format(PyExc_RuntimeError, "Can't find converter for '%s'.", %in.typeName( return 0; // @snippet return-qvariant -// @snippet return-qvariant-type -const char *typeName = QMetaType(%in).name(); -PyObject *%out; -PyTypeObject *pyType = nullptr; -if (typeName) - pyType = Shiboken::Conversions::getPythonTypeObject(typeName); -%out = pyType ? (reinterpret_cast<PyObject *>(pyType)) : Py_None; -Py_INCREF(%out); -return %out; -// @snippet return-qvariant-type - // @snippet return-qjsonobject // The QVariantMap returned by QJsonObject seems to cause a segfault, so // using QJsonObject.toVariantMap() won't work. diff --git a/sources/pyside6/PySide6/glue/qtgui.cpp b/sources/pyside6/PySide6/glue/qtgui.cpp index 8dd59e068..914c5d904 100644 --- a/sources/pyside6/PySide6/glue/qtgui.cpp +++ b/sources/pyside6/PySide6/glue/qtgui.cpp @@ -471,11 +471,6 @@ PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[%ARG1_TYPE](%1)); %CPPSELF.%FUNCTION_NAME(%1.data(), %1.size(), %2); // @snippet qpainter-drawpolygon -// @snippet qmatrix-map-point -QPoint p(%CPPSELF.%FUNCTION_NAME(%1)); -%PYARG_0 = %CONVERTTOPYTHON[QPoint](p); -// @snippet qmatrix-map-point - // @snippet qmatrix4x4 // PYSIDE-795: All PySequences can be made iterable with PySequence_Fast. Shiboken::AutoDecRef seq(PySequence_Fast(%PYARG_1, "Can't turn into sequence")); diff --git a/sources/pyside6/PySide6/glue/qtopengl.cpp b/sources/pyside6/PySide6/glue/qtopengl.cpp deleted file mode 100644 index 25b6ee096..000000000 --- a/sources/pyside6/PySide6/glue/qtopengl.cpp +++ /dev/null @@ -1,74 +0,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$ -** -****************************************************************************/ - -// @snippet qglbuffer-allocate -int size = (%2 < 0) ? %1.size() : %2; -%CPPSELF.allocate(static_cast<const void *>(%1.data()), size); -// @snippet qglbuffer-allocate - -// @snippet qglbuffer-read -char *data = new char[%3]; -bool result = %CPPSELF.read(%1, data, %3); -QByteArray ret; -if (result) - ret.append(data, %3); -%PYARG_0 = PyTuple_New(2); -PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[bool](result)); -PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QByteArray](ret)); -delete[] data; -// @snippet qglbuffer-read - -// @snippet qglbuffer-write -int size = (%3 < 0) ? %2.size() : %3; -%CPPSELF.write(%1, static_cast<const void *>(%2.data()), size); -// @snippet qglbuffer-write - -// @snippet qglbuffer-map -Py_ssize_t dataSize = %CPPSELF.size(); -void *data = %CPPSELF.map(%1); - -if (!data) { - Py_INCREF(Py_None); - %PYARG_0 = Py_None; -} else if (%1 == QGLBuffer::ReadOnly) { - %PYARG_0 = Shiboken::Buffer::newObject(data, dataSize, Shiboken::Buffer::ReadOnly); -} else { - %PYARG_0 = Shiboken::Buffer::newObject(data, dataSize, Shiboken::Buffer::ReadWrite); -} -// @snippet qglbuffer-map diff --git a/sources/pyside6/PySide6/glue/qtscript.cpp b/sources/pyside6/PySide6/glue/qtscript.cpp deleted file mode 100644 index cf168d6bd..000000000 --- a/sources/pyside6/PySide6/glue/qtscript.cpp +++ /dev/null @@ -1,74 +0,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$ -** -****************************************************************************/ - -// @snippet qscriptvalue-repr -if (%CPPSELF.isVariant() || %CPPSELF.isString()) { - QString format = QString::asprintf("%s(\"%s\")", - Py_TYPE(%PYSELF)->tp_name, - qPrintable(%CPPSELF.toString())); - %PYARG_0 = Shiboken::String::fromCString(qPrintable(format)); - } else { - %PYARG_0 = Shiboken::String::fromCString(Py_TYPE(%PYSELF)->tp_name); -} -// @snippet qscriptvalue-repr - -// @snippet qscriptvalue-mgetitem -Shiboken::AutoDecRef key(PyObject_Str(_key)); -QVariant res = %CPPSELF.property(Shiboken::String::toCString(key.object())).toVariant(); -if (res.isValid()) { - return %CONVERTTOPYTHON[QVariant](res); -} else { - PyObject *errorType = PyInt_Check(_key) ? PyExc_IndexError : PyExc_KeyError; - PyErr_SetString(errorType, "Key not found."); - return 0; -} -// @snippet qscriptvalue-mgetitem - -// @snippet qscriptvalueiterator-next -if (%CPPSELF.hasNext()) { - %CPPSELF.next(); - QString name = %CPPSELF.name(); - QVariant value = %CPPSELF.value().toVariant(); - %PYARG_0 = PyTuple_New(2); - PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[QString](name)); - PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QVariant](value)); -} else { - PyErr_SetNone(PyExc_StopIteration); -} -// @snippet qscriptvalueiterator-next diff --git a/sources/pyside6/PySide6/glue/qtwebkitwidgets.cpp b/sources/pyside6/PySide6/glue/qtwebkitwidgets.cpp deleted file mode 100644 index c0f182747..000000000 --- a/sources/pyside6/PySide6/glue/qtwebkitwidgets.cpp +++ /dev/null @@ -1,92 +0,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$ -** -****************************************************************************/ - -// @snippet qwebview-page -auto _pyReturn = reinterpret_cast<SbkObject *>(%PYARG_0); -if (!Shiboken::Object::hasParentInfo(_pyReturn)) - Shiboken::Object::setParent(%PYSELF, %PYARG_0); -// @snippet qwebview-page - -// @snippet qwebelementcollection-len -return %CPPSELF.count(); -// @snippet qwebelementcollection-len - -// @snippet qwebelementcollection-getitem -if (_i < 0 || _i >= %CPPSELF.count()) { - PyErr_SetString(PyExc_IndexError, "index out of bounds"); - return 0; -} -QWebElement element = %CPPSELF.at(_i); -return %CONVERTTOPYTHON[QWebElement](element); -// @snippet qwebelementcollection-getitem - -// @snippet qwebpage-qt-metacall -static int _signalIndex = -1; -static QMetaMethod _m; - -if (_signalIndex == -1) { - _signalIndex = QWebPage::staticMetaObject.indexOfSlot("shouldInterruptJavaScript()") - _m = QWebPage::staticMetaObject.method(_signalIndex); -} - -if (_signalIndex == id) { - Shiboken::GilState gil; - auto self = reinterpret_cast<PyObject *>(Shiboken::BindingManager::instance().retrieveWrapper(this)); - - if (self) { - Shiboken::AutoDecRef _pyMethod(PyObject_GetAttrString(self, "shouldInterruptJavaScript")); - return PySide::SignalManager::callPythonMetaMethod(_m, args, _pyMethod, false); - } -} -// @snippet qwebpage-qt-metacall - -// @snippet qwebframe-metadata -%PYARG_0 = PyDict_New(); -const auto &keys = %0.keys(); -for (const auto &_key : keys) { - Shiboken::AutoDecRef _pyValueList(PyList_New(0)); - for (auto it = %0.lowerBound(key), end = %0.upperBound(key); it ! = end; ++it) { - Shiboken::AutoDecRef _pyValue(%CONVERTTOPYTHON[QString](it.value)); - PyList_Append(_pyValueList, _pyValue); - } - - Shiboken::AutoDecRef _pyKey(%CONVERTTOPYTHON[QString](_key)); - PyDict_SetItem(%PYARG_0, _pyKey, _pyValueList); -} -// @snippet qwebframe-metadata diff --git a/sources/pyside6/PySide6/glue/qtxml.cpp b/sources/pyside6/PySide6/glue/qtxml.cpp index 684ff33c4..264bf4074 100644 --- a/sources/pyside6/PySide6/glue/qtxml.cpp +++ b/sources/pyside6/PySide6/glue/qtxml.cpp @@ -37,16 +37,6 @@ ** ****************************************************************************/ -// @snippet qxmlentityresolver-resolveentity -QXmlInputSource *_qxmlinputsource_arg_ = nullptr; -%BEGIN_ALLOW_THREADS -%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1, %2, _qxmlinputsource_arg_); -%END_ALLOW_THREADS -%PYARG_0 = PyTuple_New(2); -PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](%0)); -PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QXmlInputSource *](_qxmlinputsource_arg_)); -// @snippet qxmlentityresolver-resolveentity - // @snippet qdomdocument-setcontent QString _errorMsg_; int _errorLine_ = 0; diff --git a/sources/pyside6/PySide6/glue/qtxmlpatterns.cpp b/sources/pyside6/PySide6/glue/qtxmlpatterns.cpp deleted file mode 100644 index 75ad3b265..000000000 --- a/sources/pyside6/PySide6/glue/qtxmlpatterns.cpp +++ /dev/null @@ -1,43 +0,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$ -** -****************************************************************************/ - -// @snippet qxmlschemavalidator-schema -QXmlSchema *%0 = new QXmlSchema(%CPPSELF.schema()); -%PYARG_0 = %CONVERTTOPYTHON[QXmlSchema *](%0); -// @snippet qxmlschemavalidator-schema diff --git a/sources/pyside6/PySide6/templates/webkitwidgets_common.xml b/sources/pyside6/PySide6/templates/webkitwidgets_common.xml deleted file mode 100644 index 9d0c8e587..000000000 --- a/sources/pyside6/PySide6/templates/webkitwidgets_common.xml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -/**************************************************************************** -** -** 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> - <template name="qwebpage_extension_argument_conversion"> - PyObject* %out = 0; - // Cast the parameters according to the extension type - if (extension == QWebPage::ChooseMultipleFilesExtension) { - const ChooseMultipleFilesExtension$TYPE_SUFFIX* _in = reinterpret_cast<const ChooseMultipleFilesExtension$TYPE_SUFFIX*>(%in); - %out = %CONVERTTOPYTHON[const QWebPage::ChooseMultipleFilesExtension$TYPE_SUFFIX*](_in); - } else if (extension == QWebPage::ErrorPageExtension) { - const auto _in = reinterpret_cast<const ErrorPageExtension$TYPE_SUFFIX*>(%in); - %out = %CONVERTTOPYTHON[const QWebPage::ErrorPageExtension$TYPE_SUFFIX*](_in); - } - </template> - - <template name="qstring_remove"> - QString _local; - QString* %4 = &_local; - </template> - - <template name="pysequence_qstring"> - Shiboken::AutoDecRef pyRes(PySequence_GetItem(%PYARG_0, 0)); - Shiboken::AutoDecRef pyStr(PySequence_GetItem(%PYARG_0, 1)); - %RETURN_TYPE %out = %CONVERTTOCPP[%RETURN_TYPE](pyRes); - *%4 = %CONVERTTOCPP[QString](pyStr); - </template> - - <template name="qstring_pytuple"> - %PYARG_0 = PyTuple_New(2); - PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](%0)); - PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QString](*%4)); - </template> - -</typesystem> diff --git a/sources/pyside6/PySide6/templates/xml_common.xml b/sources/pyside6/PySide6/templates/xml_common.xml deleted file mode 100644 index 0a6ae4906..000000000 --- a/sources/pyside6/PySide6/templates/xml_common.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -/**************************************************************************** -** -** 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> - - <template name="QXmlEntityResolver_resolveEntity_return_conversion_native"> - Shiboken::AutoDecRef _py_ok_(PySequence_GetItem(%PYARG_0, 0)); - Shiboken::AutoDecRef _py_ret_(PySequence_GetItem(%PYARG_0, 1)); - %RETURN_TYPE %out = %CONVERTTOCPP[%RETURN_TYPE](_py_ok_); - %3 = %CONVERTTOCPP[QXmlInputSource*](_py_ret_); - </template> - - <template name="fix_virtual_method_return_value_and_bool*"> - Shiboken::AutoDecRef _py_ret_(PySequence_GetItem(%PYARG_0, 0)); - Shiboken::AutoDecRef _py_ok_(PySequence_GetItem(%PYARG_0, 1)); - %RETURN_TYPE %out = %CONVERTTOCPP[%RETURN_TYPE](_py_ret_); - *%2 = %CONVERTTOCPP[bool](_py_ok_); - </template> - -</typesystem> |