diff options
Diffstat (limited to 'PySide')
-rw-r--r-- | PySide/QtCore/qvariant_conversions.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/PySide/QtCore/qvariant_conversions.h b/PySide/QtCore/qvariant_conversions.h index 06a8368cd..fc2dca55c 100644 --- a/PySide/QtCore/qvariant_conversions.h +++ b/PySide/QtCore/qvariant_conversions.h @@ -47,9 +47,6 @@ struct Converter<QVariant> return convertToVariantMap(pyObj); } else if (PySequence_Check(pyObj)) { return convertToVariantList(pyObj); - } else if (!isShibokenType(pyObj) || isUserType(pyObj)) { - // QVariant(User class) - return QVariant::fromValue<PySide::PyObjectWrapper>(pyObj); } else { // a class supported by QVariant? if (Shiboken::isShibokenType(pyObj)) { @@ -60,7 +57,7 @@ struct Converter<QVariant> void** data = reinterpret_cast<SbkBaseWrapper*>(pyObj)->cptr; if (typeName[strlen(typeName)-1] == '*') return QVariant(typeCode, data); - else + else if (!isUserType(pyObj)) // User types inherited from Value types *should* not be converted. return QVariant(typeCode, data[0]); } } |