aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6')
-rw-r--r--sources/pyside6/PySide6/glue/qtcore.cpp2
-rw-r--r--sources/pyside6/libpyside/pyside.cpp8
2 files changed, 10 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/glue/qtcore.cpp b/sources/pyside6/PySide6/glue/qtcore.cpp
index 8438df976..e48df2679 100644
--- a/sources/pyside6/PySide6/glue/qtcore.cpp
+++ b/sources/pyside6/PySide6/glue/qtcore.cpp
@@ -671,6 +671,7 @@ return %CONVERTTOPYTHON[QByteArray](ba);
// @snippet qbytearray-mgetitem
// @snippet qbytearray-msetitem
+// PYSIDE-2404: Usage of the `get()` function not necessary, the type exists.
if (PyIndex_Check(_key)) {
Py_ssize_t _i = PyNumber_AsSsize_t(_key, PyExc_IndexError);
if (_i == -1 && PyErr_Occurred())
@@ -1806,6 +1807,7 @@ if (dataChar == nullptr) {
// @snippet qdatastream-read-bytes
// @snippet qloggingcategory_to_cpp
+// PYSIDE-2404: Usage of the `get()` function not necessary, the type exists.
QLoggingCategory *category{nullptr};
Shiboken::Conversions::pythonToCppPointer(SbkPySide6_QtCoreTypes[SBK_QLoggingCategory_IDX],
pyArgs[0], &(category));
diff --git a/sources/pyside6/libpyside/pyside.cpp b/sources/pyside6/libpyside/pyside.cpp
index 074c289b8..f4f113d34 100644
--- a/sources/pyside6/libpyside/pyside.cpp
+++ b/sources/pyside6/libpyside/pyside.cpp
@@ -32,6 +32,7 @@
#include <sbkstring.h>
#include <sbkstaticstrings.h>
#include <sbkfeature_base.h>
+#include <sbkmodule.h>
#include <QtCore/QByteArray>
#include <QtCore/QCoreApplication>
@@ -687,6 +688,13 @@ static const char *typeName(const QObject *cppSelf)
typeName = name;
break;
}
+ // PYSIDE-2404: Did not find the name. Load the lazy classes
+ // which have this name and try again.
+ Shiboken::Module::loadLazyClassesWithName(name);
+ if (Shiboken::Conversions::getConverter(name)) {
+ typeName = name;
+ break;
+ }
}
}
return typeName;