diff options
| author | Cristián Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2024-11-06 11:10:03 +0100 |
|---|---|---|
| committer | Cristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2024-11-08 14:24:28 +0100 |
| commit | 65a9ae9a853fa68ff997edbe3d6fd4eed022f1a0 (patch) | |
| tree | 735b82851430560a81ec28a848cdd09fdb2c36c0 /sources/pyside6/PySide6/QtWebEngineCore | |
| parent | c951f11196d0572b7250a74197937c02b74604dd (diff) | |
limited api: Remove PyTuple_GET_ITEM, PyTuple_SET_ITEM, and PyTuple_GET_SIZE macros
Removing old macros for compatibility with the limited api,
and refactoring some of their usages
Change-Id: I33954199d2ef9884c64b963863b97aed851c440f
Pick-to: 6.8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/PySide6/QtWebEngineCore')
| -rw-r--r-- | sources/pyside6/PySide6/QtWebEngineCore/glue/webenginepage_functors.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sources/pyside6/PySide6/QtWebEngineCore/glue/webenginepage_functors.cpp b/sources/pyside6/PySide6/QtWebEngineCore/glue/webenginepage_functors.cpp index 0328a9f6a..3591591a7 100644 --- a/sources/pyside6/PySide6/QtWebEngineCore/glue/webenginepage_functors.cpp +++ b/sources/pyside6/PySide6/QtWebEngineCore/glue/webenginepage_functors.cpp @@ -22,7 +22,7 @@ void RunJavascriptFunctor::operator()(const QVariant &result) case QMetaType::Bool: { PyObject *pyValue = result.toBool() ? Py_True : Py_False; Py_INCREF(pyValue); - PyTuple_SET_ITEM(arglist, 0, pyValue); + PyTuple_SetItem(arglist, 0, pyValue); } break; case QMetaType::Int: @@ -30,11 +30,11 @@ void RunJavascriptFunctor::operator()(const QVariant &result) case QMetaType::LongLong: case QMetaType::ULongLong: case QMetaType::Double: - PyTuple_SET_ITEM(arglist, 0, PyFloat_FromDouble(result.toDouble())); + PyTuple_SetItem(arglist, 0, PyFloat_FromDouble(result.toDouble())); break; default: { const QString value = result.toString(); - PyTuple_SET_ITEM(arglist, 0, PySide::qStringToPyUnicode(value)); + PyTuple_SetItem(arglist, 0, PySide::qStringToPyUnicode(value)); } break; } @@ -49,7 +49,7 @@ void PrintToPdfFunctor::operator()(const QByteArray &pdf) Shiboken::Conversions::SpecificConverter converter("QByteArray"); PyObject *pyPdf = converter.toPython(&pdf); - PyTuple_SET_ITEM(arglist, 0, pyPdf); + PyTuple_SetItem(arglist, 0, pyPdf); Shiboken::AutoDecRef ret(PyObject_CallObject(object(), arglist)); release(); // single shot } |
