diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-08-20 10:02:25 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-08-20 11:29:16 +0000 |
| commit | d8e24b439d4b801f97363cf61ced4834970fe96f (patch) | |
| tree | 20610a5aeb0c663fbf0fff39040c2cbaee9615b1 /sources/pyside2/PySide2 | |
| parent | 0ce75404f2bf9aacfab390660b078102c906be8c (diff) | |
Remove QStringRef
Port the remaining XML parser code in shiboken to QStringView.
Remove the QStringRef type.
The QStringView-related refactoring of QXmlStreamAttributes
somehow exposed the value() methods of its base class (QList),
which cause compilation errors. Remove them.
Task-number: QTBUG-84319
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: If01516f962eddcc0591ccaff322843f2fc040549
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside2/PySide2')
| -rw-r--r-- | sources/pyside2/PySide2/QtCore/typesystem_core_common.xml | 8 | ||||
| -rw-r--r-- | sources/pyside2/PySide2/glue/qtcore.cpp | 9 |
2 files changed, 3 insertions, 14 deletions
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml index 8325a06e4..05dc7185b 100644 --- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml +++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml @@ -263,11 +263,6 @@ </conversion-rule> </primitive-type> - <primitive-type name="QStringRef"> - <conversion-rule> - <native-to-target file="../glue/qtcore.cpp" snippet="return-pyunicode-qstringref"/> - </conversion-rule> - </primitive-type> <primitive-type name="QChar"> <conversion-rule> <native-to-target file="../glue/qtcore.cpp" snippet="return-pyunicode-qchar"/> @@ -2708,6 +2703,9 @@ <modify-function signature="push_front(QXmlStreamAttribute)" remove="all"/> <modify-function signature="pop_front()" remove="all"/> <modify-function signature="toList()const" remove="all"/> + <!-- Remove methods from QList --> + <modify-function signature="value(qsizetype,const QXmlStreamAttribute&) const" remove="all"/> + <modify-function signature="value(qsizetype) const" remove="all"/> <modify-function signature="fromList(const QList<QXmlStreamAttribute> &)" remove="all"/> <modify-function signature="operator+=(QVector<QXmlStreamAttribute>)" remove="all"/> <!-- Expose operator==, != inherited from QList, which the parser does diff --git a/sources/pyside2/PySide2/glue/qtcore.cpp b/sources/pyside2/PySide2/glue/qtcore.cpp index 6061b27d6..8d25907d6 100644 --- a/sources/pyside2/PySide2/glue/qtcore.cpp +++ b/sources/pyside2/PySide2/glue/qtcore.cpp @@ -1917,15 +1917,6 @@ QByteArray ba = %in.toUtf8(); return PyUnicode_FromStringAndSize(ba.constData(), ba.size()); // @snippet return-pyunicode -// @snippet return-pyunicode-qstringref - const int N = %in.length(); - wchar_t *str = new wchar_t[N]; - %in.toString().toWCharArray(str); - PyObject *%out = PyUnicode_FromWideChar(str, N); - delete[] str; - return %out; -// @snippet return-pyunicode-qstringref - // @snippet return-pyunicode-qchar wchar_t c = (wchar_t)%in.unicode(); return PyUnicode_FromWideChar(&c, 1); |
