aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtGui/qpixmap_conversion.h
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-11-19 15:02:42 -0300
committerRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-11-19 16:05:00 -0300
commitc9aef92cab51623aba0211c5805c88386c638e0a (patch)
tree61426bf65dee72162eb406bfbb649c016e881976 /PySide/QtGui/qpixmap_conversion.h
parent5e0550446c3546beb4a7076a80a7475b394567f4 (diff)
Update to new Shiboken API (Renamed SbkObjectType)
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
Diffstat (limited to 'PySide/QtGui/qpixmap_conversion.h')
-rw-r--r--PySide/QtGui/qpixmap_conversion.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/PySide/QtGui/qpixmap_conversion.h b/PySide/QtGui/qpixmap_conversion.h
index ba21e08d..f6a2e58e 100644
--- a/PySide/QtGui/qpixmap_conversion.h
+++ b/PySide/QtGui/qpixmap_conversion.h
@@ -8,15 +8,15 @@ inline bool Converter<QPixmap>::isConvertible(PyObject* pyobj)
{
if (ValueTypeConverter<QPixmap>::isConvertible(pyobj))
return true;
- SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType<QPixmap>());
+ SbkBaseType* shiboType = reinterpret_cast<SbkBaseType*>(SbkType<QPixmap>());
bool isVariant = Converter<QVariant>::checkType(pyobj);
if (isVariant) {
QVariant var(Converter<QVariant>::toCpp(pyobj));
return var.type() == QVariant::Pixmap;
} else if (Converter<QSize>::checkType(pyobj) || Converter<QString>::checkType(pyobj)) {
return true;
- } else if (shiboType->ext_isconvertible) {
- return shiboType->ext_isconvertible(pyobj);
+ } else {
+ return Shiboken::BaseType::isExternalConvertible(shiboType, pyobj);
}
return false;
@@ -24,7 +24,7 @@ inline bool Converter<QPixmap>::isConvertible(PyObject* pyobj)
inline QPixmap Converter<QPixmap>::toCpp(PyObject* pyobj)
{
- SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType<QPixmap>());
+ SbkBaseType* shiboType = reinterpret_cast<SbkBaseType*>(SbkType<QPixmap>());
bool isVariant = Converter<QVariant>::checkType(pyobj);
if (isVariant) {
QVariant var(Converter<QVariant>::toCpp(pyobj));
@@ -33,8 +33,8 @@ inline QPixmap Converter<QPixmap>::toCpp(PyObject* pyobj)
return QPixmap(Shiboken::Converter<QSize >::toCpp(pyobj));
} else if (Converter<QString>::checkType(pyobj)) {
return QPixmap(Shiboken::Converter<QString >::toCpp(pyobj));
- } else if (shiboType->ext_isconvertible && shiboType->ext_tocpp && shiboType->ext_isconvertible(pyobj)) {
- QPixmap* cptr = reinterpret_cast<QPixmap*>(shiboType->ext_tocpp(pyobj));
+ } else if (Shiboken::BaseType::isExternalConvertible(shiboType, pyobj) && Shiboken::BaseType::hasExternalCppConversions(shiboType)) {
+ QPixmap* cptr = reinterpret_cast<QPixmap*>(Shiboken::BaseType::callExternalCppConversion(shiboType, pyobj));
std::auto_ptr<QPixmap> cptr_auto_ptr(cptr);
return *cptr;
}