diff options
| author | Christian Tismer <tismer@stackless.com> | 2021-05-16 12:24:00 +0200 |
|---|---|---|
| committer | Christian Tismer <tismer@stackless.com> | 2023-03-21 08:49:56 +0100 |
| commit | e8095467f7d0332cc0987e7c541de9906e19fece (patch) | |
| tree | c414491f86f34308a051bdb781581b23431a4e20 /sources/pyside6/libpyside/pyside.cpp | |
| parent | 18812159a8cd5295ac8d51e37f9021ad21434b90 (diff) | |
Implement multiple inheritance correctly, compatible version
PySide does not implement multiple inheritance.
Please see "About Multiple Inheritance in Python" at the issue.
This patch just supports the `__init__` call.
A more consequent implementation will follow that
supports multiple inheritance with every method.
[ChangeLog][pyside6] Cooperative multiple inheritance is now
implemented for all __init__ methods.
Fixes: PYSIDE-1564
Change-Id: I8df805d22c2052c3a9747420a86341f64e29a5ad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/libpyside/pyside.cpp')
| -rw-r--r-- | sources/pyside6/libpyside/pyside.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sources/pyside6/libpyside/pyside.cpp b/sources/pyside6/libpyside/pyside.cpp index 42b7725cc..29a3d2884 100644 --- a/sources/pyside6/libpyside/pyside.cpp +++ b/sources/pyside6/libpyside/pyside.cpp @@ -299,7 +299,8 @@ static bool _setProperty(PyObject *qObj, PyObject *name, PyObject *value, bool * return true; } -bool fillQtProperties(PyObject *qObj, const QMetaObject *metaObj, PyObject *kwds) +bool fillQtProperties(PyObject *qObj, const QMetaObject *metaObj, + PyObject *kwds, bool allowErrors) { PyObject *key, *value; @@ -331,6 +332,10 @@ bool fillQtProperties(PyObject *qObj, const QMetaObject *metaObj, PyObject *kwds return false; } } + if (allowErrors) { + PyErr_Clear(); + continue; + } if (!accept) { PyErr_Format(PyExc_AttributeError, "'%s' is not a Qt property or a signal", propName.constData()); |
