From b5a574eaeeb6a4f30794e6012b96f05a3de49217 Mon Sep 17 00:00:00 2001 From: Cristian Maureira-Fredes Date: Fri, 27 Jul 2018 15:18:18 +0200 Subject: Enforce pure PyDict to be associated to VariantMap Classes that implement the dictionary protocol needs to be treated as PyObject and not plain dictionaries, then we can properly transform PyDicts to Variant Maps. The reason behind this is that it seems that the PyDict_Check is too permisive and allow objects that are not proper dictionaries. The default case by any other Sequence-like object will be a PyObject. Task-number: PYSIDE-82 Change-Id: I86e8a29e5b8740f69c9c6f315e9d337e599bd333 Reviewed-by: Christian Tismer --- sources/pyside2/PySide2/QtCore/typesystem_core_common.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml index f50a2aaad..7e3d86d8a 100644 --- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml +++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml @@ -422,7 +422,7 @@ converter.toCpp(pyIn, var.data()); %out = var; - + QVariant ret = QVariant_convertToVariantMap(%in); %out = ret.isValid() ? ret : QVariant::fromValue<PySide::PyObjectWrapper>(%in); -- cgit v1.2.3