Fixed PySide custom conversions to work with newer versions of shiboken generator.

This commit is contained in:
Hugo Lima 2010-03-15 14:46:30 -03:00
commit 781bdbe632
12 changed files with 97 additions and 163 deletions

View file

@ -30,6 +30,7 @@ struct QMetaTypeId< PyObjectHolder >
QT_END_NAMESPACE
namespace Shiboken {
// all types are convertible to QVariant
inline bool Converter<QVariant>::isConvertible(PyObject* pyobj)
{
@ -84,4 +85,10 @@ inline QVariant Converter<QVariant>::toCpp(PyObject* pyobj)
return QVariant(typeCode, reinterpret_cast<SbkBaseWrapper*>(pyobj)->cptr);
}
}
inline PyObject* Converter<QVariant>::toPython(const QVariant& cppObj)
{
return ValueTypeConverter<QVariant>::toPython(cppObj);
}
}