diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-11-07 10:21:23 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-11-08 12:39:39 +0000 |
| commit | e0a44ab3c8b7534dedbcda2b480a43cb2f60164c (patch) | |
| tree | b2ca7d8db84c82c7aa596f9f5d0317cbc78f3ed1 /sources/pyside6/libpyside/pysidesignal.cpp | |
| parent | a824208f187162daa8eb0c79fbca4b5b5826efb5 (diff) | |
Fix passing dicts as QVariantMap to QML
Add the name to the known types for signal/slot signatures,
preventing it from falling through to the PyObject default
converter, which causes reference leaks.
Fixes: PYSIDE-2098
Change-Id: Id95d8a352dd1913bd10578f1ec11de0c533e8f40
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside6/libpyside/pysidesignal.cpp')
| -rw-r--r-- | sources/pyside6/libpyside/pysidesignal.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/pyside6/libpyside/pysidesignal.cpp b/sources/pyside6/libpyside/pysidesignal.cpp index 8a32bf005..f87b86a61 100644 --- a/sources/pyside6/libpyside/pysidesignal.cpp +++ b/sources/pyside6/libpyside/pysidesignal.cpp @@ -867,6 +867,8 @@ QByteArray getTypeName(PyObject *obType) return QByteArrayLiteral("bool"); if (type == &PyList_Type) return QByteArrayLiteral("QVariantList"); + if (type == &PyDict_Type) + return QByteArrayLiteral("QVariantMap"); if (Py_TYPE(type) == SbkEnumType_TypeF()) return Shiboken::Enum::getCppName(type); return QByteArrayLiteral("PyObject"); |
