aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtCore
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/QtCore
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/QtCore')
-rw-r--r--PySide/QtCore/glue/qcoreapplication_init.cpp2
-rw-r--r--PySide/QtCore/qvariant_conversions.h12
-rw-r--r--PySide/QtCore/qvariant_type_conversions.h4
3 files changed, 9 insertions, 9 deletions
diff --git a/PySide/QtCore/glue/qcoreapplication_init.cpp b/PySide/QtCore/glue/qcoreapplication_init.cpp
index 274afb6d3..446074c67 100644
--- a/PySide/QtCore/glue/qcoreapplication_init.cpp
+++ b/PySide/QtCore/glue/qcoreapplication_init.cpp
@@ -4,7 +4,7 @@ static char** QCoreApplicationArgValues;
int Sbk_QCoreApplication_Init(PyObject* self, PyObject* args, PyObject*)
{
- if (Shiboken::isUserType(self) && !Shiboken::canCallConstructor(self->ob_type, Shiboken::SbkType<QApplication >()))
+ if (Shiboken::Wrapper::isUserType(self) && !Shiboken::BaseType::canCallConstructor(self->ob_type, Shiboken::SbkType<QApplication >()))
return -1;
diff --git a/PySide/QtCore/qvariant_conversions.h b/PySide/QtCore/qvariant_conversions.h
index a2ac42786..bfff5651f 100644
--- a/PySide/QtCore/qvariant_conversions.h
+++ b/PySide/QtCore/qvariant_conversions.h
@@ -16,13 +16,13 @@ struct Converter<QVariant>
static QByteArray resolveMetaType(PyTypeObject* type, int &typeId)
{
- if (PyObject_TypeCheck(type, &SbkObjectType_Type)) {
- SbkObjectType* sbkType = reinterpret_cast<SbkObjectType*>(type);
- QByteArray typeName(sbkType->original_name);
+ if (PyObject_TypeCheck(type, &SbkBaseType_Type)) {
+ SbkBaseType* sbkType = reinterpret_cast<SbkBaseType*>(type);
+ QByteArray typeName(Shiboken::BaseType::getOriginalName(sbkType));
bool valueType = !typeName.endsWith("*");
// Do not convert user type of value
- if (valueType && sbkType->is_user_type)
+ if (valueType && Shiboken::BaseType::isUserType(type))
return QByteArray();
int obTypeId = QMetaType::type(typeName);
@@ -86,8 +86,8 @@ struct Converter<QVariant>
return convertToVariantList(pyObj);
} else {
// a class supported by QVariant?
- if (Shiboken::isShibokenType(pyObj)) {
- SbkObjectType* objType = reinterpret_cast<SbkObjectType*>(pyObj->ob_type);
+ if (Shiboken::Wrapper::checkType(pyObj)) {
+ SbkBaseType* objType = reinterpret_cast<SbkBaseType*>(pyObj->ob_type);
int typeCode = 0;
QByteArray typeName = resolveMetaType(reinterpret_cast<PyTypeObject*>(objType), typeCode);
if (typeCode) {
diff --git a/PySide/QtCore/qvariant_type_conversions.h b/PySide/QtCore/qvariant_type_conversions.h
index 4ec47653f..74b3289d1 100644
--- a/PySide/QtCore/qvariant_type_conversions.h
+++ b/PySide/QtCore/qvariant_type_conversions.h
@@ -26,8 +26,8 @@ struct Converter<QVariant::Type>
else if (pyObj == reinterpret_cast<PyObject*>(&PyLong_Type))
typeName = "int"; // long is a UserType in QVariant.
else if (PyType_Check(pyObj)) {
- if (pyObj->ob_type == &SbkObjectType_Type)
- typeName = reinterpret_cast<SbkObjectType*>(pyObj)->original_name;
+ if (pyObj->ob_type == &SbkBaseType_Type)
+ typeName = Shiboken::BaseType::getOriginalName(reinterpret_cast<SbkBaseType*>(pyObj));
else
typeName = reinterpret_cast<PyTypeObject*>(pyObj)->tp_name;
}