diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-07-12 17:32:09 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-07-13 13:55:27 +0000 |
commit | 234b33aafe12c6f880600598ed1d7ee9bc83c53a (patch) | |
tree | bea7061385fa98f29422aee3c311d203cb6f68de | |
parent | 68d73ee9ed5571bd8de760fd25dbc6c0da1c496d (diff) |
PySide6: Remove QVector conversion templates
Change-Id: I7c56bf26d7b501e4c7a906fe87d48002c316d25b
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit a894ba132cbc9ca8368ff8cad89e3e984144637a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | sources/pyside6/PySide6/templates/core_common.xml | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/sources/pyside6/PySide6/templates/core_common.xml b/sources/pyside6/PySide6/templates/core_common.xml index 2ba4cffa3..db63e431d 100644 --- a/sources/pyside6/PySide6/templates/core_common.xml +++ b/sources/pyside6/PySide6/templates/core_common.xml @@ -316,36 +316,6 @@ } </template> - <template name="cppvector_to_pylist_conversion"> - %INTYPE::size_type vectorSize = %in.size(); - PyObject *%out = PyList_New(Py_ssize_t(vectorSize)); - for (%INTYPE::size_type idx = 0; idx < vectorSize; ++idx) { - %INTYPE_0 cppItem(%in.at(idx)); - PyList_SET_ITEM(%out, idx, %CONVERTTOPYTHON[%INTYPE_0](cppItem)); - } - return %out; - </template> - - <template name="pyseq_to_cppvector_conversion"> - // PYSIDE-795: Turn all sequences into iterables. - if (PySequence_Check(%in)) { - int vectorSize = PySequence_Size(%in); - %out.reserve(vectorSize); - } - Shiboken::AutoDecRef it(PyObject_GetIter(%in)); - PyObject *(*iternext)(PyObject *) = *Py_TYPE(it)->tp_iternext; - for (;;) { - Shiboken::AutoDecRef pyItem(iternext(it)); - if (pyItem.isNull()) { - if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) - PyErr_Clear(); - break; - } - %OUTTYPE_0 cppItem = %CONVERTTOCPP[%OUTTYPE_0](pyItem); - %out.push_back(cppItem); - } - </template> - <template name="checkPyCapsuleOrPyCObject_func"> static bool checkPyCapsuleOrPyCObject(PyObject* pyObj) { |