diff options
Diffstat (limited to 'sources/pyside2')
-rw-r--r-- | sources/pyside2/PySide2/QtCore/glue/qeasingcurve_glue.cpp | 6 | ||||
-rw-r--r-- | sources/pyside2/PySide2/glue/qtcore.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sources/pyside2/PySide2/QtCore/glue/qeasingcurve_glue.cpp b/sources/pyside2/PySide2/QtCore/glue/qeasingcurve_glue.cpp index 4f55fb8f3..552191955 100644 --- a/sources/pyside2/PySide2/QtCore/glue/qeasingcurve_glue.cpp +++ b/sources/pyside2/PySide2/QtCore/glue/qeasingcurve_glue.cpp @@ -121,7 +121,7 @@ PySideEasingCurveFunctor::~PySideEasingCurveFunctor() { CustomFunctionsData::m_list[m_index].m_obj = 0; - PyObject_SetAttrString(m_parent, "__ecf__", Py_None); + PyObject_SetAttr(m_parent, Shiboken::PyMagicName::ecf(), Py_None); } qreal PySideEasingCurveFunctor::operator()(qreal progress) @@ -146,13 +146,13 @@ PyObject *PySideEasingCurveFunctor::callable() PyObject *PySideEasingCurveFunctor::callable(PyObject *parent) { - return PyObject_GetAttrString(parent, "__ecf__"); + return PyObject_GetAttr(parent, Shiboken::PyMagicName::ecf()); } PySideEasingCurveFunctor::PySideEasingCurveFunctor(int index, PyObject *parent, PyObject *pyFunc) : m_parent(parent), m_func(pyFunc), m_index(index) { - PyObject_SetAttrString(m_parent, "__ecf__", m_func); + PyObject_SetAttr(m_parent, Shiboken::PyMagicName::ecf(), m_func); PySide::WeakRef::create(m_parent, deleteData, this); } diff --git a/sources/pyside2/PySide2/glue/qtcore.cpp b/sources/pyside2/PySide2/glue/qtcore.cpp index 93f7321aa..4c798aef9 100644 --- a/sources/pyside2/PySide2/glue/qtcore.cpp +++ b/sources/pyside2/PySide2/glue/qtcore.cpp @@ -308,7 +308,7 @@ PyModule_AddStringConstant(module, "__version__", qVersion()); // @snippet qobject-connect static bool isDecorator(PyObject *method, PyObject *self) { - Shiboken::AutoDecRef methodName(PyObject_GetAttrString(method, "__name__")); + Shiboken::AutoDecRef methodName(PyObject_GetAttr(method, Shiboken::PyMagicName::name())); if (!PyObject_HasAttr(self, methodName)) return true; Shiboken::AutoDecRef otherMethod(PyObject_GetAttr(self, methodName)); @@ -811,8 +811,8 @@ _findChildrenHelper(%CPPSELF, %2, reinterpret_cast<PyTypeObject *>(%PYARG_1), %P // @snippet qobject-tr QString result; if (QCoreApplication::instance()) { - PyObject *klass = PyObject_GetAttrString(%PYSELF, "__class__"); - PyObject *cname = PyObject_GetAttrString(klass, "__name__"); + PyObject *klass = PyObject_GetAttr(%PYSELF, Shiboken::PyMagicName::class_()); + PyObject *cname = PyObject_GetAttr(klass, Shiboken::PyMagicName::name()); result = QString(QCoreApplication::instance()->translate(Shiboken::String::toCString(cname), /* %1, %2, QCoreApplication::CodecForTr, %3)); */ %1, %2, %3)); |