diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-04-30 11:06:25 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-05-06 10:57:20 +0200 |
commit | 4cdaaffbb58560dc1adbcf9de471ff4fb7d7f235 (patch) | |
tree | 83953cdaa0852358141d309d0b0b0a4f12958dc0 /sources/pyside6/libpyside/pyside.cpp | |
parent | 2a9aaa92923ac154a714f69648e65f486d289020 (diff) |
libshiboken: Split the Shiboken::Object::newObject() function
Remove the bool exactType parameter from the existing
newObject() by splitting it into 3 functions:
newObjectForType() creates an instance for the type passed in.
newObjectWithHeuristics() takes an additional typeName
parameter obtained from typeid().name() on the C++ pointer which
may contain the derived class name and also tries to find
the most derived class using the type discovery graph.
newObjectForPointer() is new and contains a test for multiple
inheritance in the inheritance tree (disabling use of the most derived
class) which was previously generated into the code.
Change-Id: Ic0a25f8ec17dc20364b37062de6f20544cd2f09e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside6/libpyside/pyside.cpp')
-rw-r--r-- | sources/pyside6/libpyside/pyside.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/pyside6/libpyside/pyside.cpp b/sources/pyside6/libpyside/pyside.cpp index d5e815a42..cff74c260 100644 --- a/sources/pyside6/libpyside/pyside.cpp +++ b/sources/pyside6/libpyside/pyside.cpp @@ -738,7 +738,7 @@ PyObject *getWrapperForQObject(QObject *cppSelf, PyTypeObject *sbk_type) } } - pyOut = Shiboken::Object::newObject(sbk_type, cppSelf, false, false, typeName(cppSelf)); + pyOut = Shiboken::Object::newObjectWithHeuristics(sbk_type, cppSelf, false, typeName(cppSelf)); return pyOut; } |