From 781bdbe6321298e7bb567a717a8b0fca4cd0e7e2 Mon Sep 17 00:00:00 2001 From: Hugo Lima Date: Mon, 15 Mar 2010 14:46:30 -0300 Subject: Fixed PySide custom conversions to work with newer versions of shiboken generator. --- PySide/QtGui/qpixmap_conversion.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'PySide/QtGui') diff --git a/PySide/QtGui/qpixmap_conversion.h b/PySide/QtGui/qpixmap_conversion.h index e3973b98c..10b480352 100644 --- a/PySide/QtGui/qpixmap_conversion.h +++ b/PySide/QtGui/qpixmap_conversion.h @@ -1,6 +1,8 @@ namespace Shiboken { inline bool Converter< QPixmap >::isConvertible(PyObject* pyobj) { + if (ValueTypeConverter::isConvertible(pyobj)) + return true; SbkBaseWrapperType* shiboType = reinterpret_cast(SbkType()); bool isVariant = SbkQVariant_Check(pyobj); if (isVariant) { @@ -34,4 +36,9 @@ inline QPixmap Converter< QPixmap >::toCpp(PyObject* pyobj) return *Converter::toCpp(pyobj); } + +inline PyObject* Converter::toPython(const QPixmap& cppObj) +{ + return ValueTypeConverter::toPython(cppObj); +} } -- cgit v1.2.3