aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtGui/qpixmap_conversion.h
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-03-15 14:46:30 -0300
committerHugo Lima <hugo.lima@openbossa.org>2010-03-17 18:17:13 -0300
commit781bdbe6321298e7bb567a717a8b0fca4cd0e7e2 (patch)
tree6eb7b4ab029f566d6aba94113cc16a579a9cdfef /PySide/QtGui/qpixmap_conversion.h
parentb53b9e49ba3b277913b970df758b75b36cc253a4 (diff)
Fixed PySide custom conversions to work with newer versions of shiboken generator.
Diffstat (limited to 'PySide/QtGui/qpixmap_conversion.h')
-rw-r--r--PySide/QtGui/qpixmap_conversion.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/PySide/QtGui/qpixmap_conversion.h b/PySide/QtGui/qpixmap_conversion.h
index e3973b98..10b48035 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<QPixmap>::isConvertible(pyobj))
+ return true;
SbkBaseWrapperType* shiboType = reinterpret_cast<SbkBaseWrapperType*>(SbkType<QPixmap>());
bool isVariant = SbkQVariant_Check(pyobj);
if (isVariant) {
@@ -34,4 +36,9 @@ inline QPixmap Converter< QPixmap >::toCpp(PyObject* pyobj)
return *Converter<QPixmap*>::toCpp(pyobj);
}
+
+inline PyObject* Converter<QPixmap>::toPython(const QPixmap& cppObj)
+{
+ return ValueTypeConverter<QPixmap>::toPython(cppObj);
+}
}