3
inline bool Converter<QByteArray>::checkType(PyObject* pyObj)
5
return ValueTypeConverter<QByteArray>::checkType(pyObj);
8
inline bool Converter<QByteArray>::isConvertible(PyObject* pyObj)
10
if (ValueTypeConverter<QByteArray>::isConvertible(pyObj))
12
SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType< ::QByteArray >());
13
return Shiboken::Converter<const char *>::checkType(pyObj)
14
|| (ObjectType::isExternalConvertible(shiboType, pyObj));
17
inline QByteArray Converter<QByteArray>::toCpp(PyObject* pyObj)
21
else if (PyObject_TypeCheck(pyObj, SbkType<QByteArray>()))
22
return *Converter<QByteArray*>::toCpp(pyObj);
23
else if (PyString_Check(pyObj))
24
return QByteArray(PyString_AS_STRING(pyObj), PyString_GET_SIZE(pyObj));
26
return ValueTypeConverter<QByteArray>::toCpp(pyObj);
29
inline PyObject* Converter<QByteArray>::toPython(const ::QByteArray& cppObj)
31
return ValueTypeConverter<QByteArray>::toPython(cppObj);