summaryrefslogtreecommitdiffstats
path: root/libpyside
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 /libpyside
parent5e0550446c3546beb4a7076a80a7475b394567f4 (diff)
downloadpyside-c9aef92cab51623aba0211c5805c88386c638e0a.tar.gz
pyside-c9aef92cab51623aba0211c5805c88386c638e0a.tar.xz
pyside-c9aef92cab51623aba0211c5805c88386c638e0a.zip
Update to new Shiboken API (Renamed SbkObjectType)
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
Diffstat (limited to 'libpyside')
-rw-r--r--libpyside/pysideconversions.h6
-rw-r--r--libpyside/pysidesignal.cpp9
-rw-r--r--libpyside/pysidesignal.h5
3 files changed, 9 insertions, 11 deletions
diff --git a/libpyside/pysideconversions.h b/libpyside/pysideconversions.h
index e8c70dc..dfc0646 100644
--- a/libpyside/pysideconversions.h
+++ b/libpyside/pysideconversions.h
@@ -40,7 +40,7 @@ struct QtDictConverter
if (PyObject_TypeCheck(pyObj, Shiboken::SbkType<QtDict>()))
return true;
- if ((Shiboken::SbkType<QtDict>() && Shiboken::isShibokenType(pyObj)) || !PyDict_Check(pyObj))
+ if ((Shiboken::SbkType<QtDict>() && Shiboken::Wrapper::checkType(pyObj)) || !PyDict_Check(pyObj))
return false;
PyObject* key;
@@ -100,7 +100,7 @@ struct QtMultiMapConverter
if (PyObject_TypeCheck(pyObj, Shiboken::SbkType<MultiMap>()))
return true;
- if ((Shiboken::SbkType<MultiMap>() && Shiboken::isShibokenType(pyObj)) || !PyDict_Check(pyObj))
+ if ((Shiboken::SbkType<MultiMap>() && Shiboken::Wrapper::checkType(pyObj)) || !PyDict_Check(pyObj))
return false;
PyObject* key;
@@ -176,7 +176,7 @@ struct QSequenceConverter
{
if (PyObject_TypeCheck(pyObj, Shiboken::SbkType<T>()))
return true;
- if ((Shiboken::SbkType<T>() && Shiboken::isShibokenType(pyObj)) || !PySequence_Check(pyObj))
+ if ((Shiboken::SbkType<T>() && Shiboken::Wrapper::checkType(pyObj)) || !PySequence_Check(pyObj))
return false;
for (int i = 0, max = PySequence_Length(pyObj); i < max; ++i) {
Shiboken::AutoDecRef item(PySequence_GetItem(pyObj, i));
diff --git a/libpyside/pysidesignal.cpp b/libpyside/pysidesignal.cpp
index 81d23dd..51e3bba 100644
--- a/libpyside/pysidesignal.cpp
+++ b/libpyside/pysidesignal.cpp
@@ -493,10 +493,9 @@ char* getTypeName(PyObject* type)
{
if (PyType_Check(type)) {
char *typeName = NULL;
- if (type->ob_type == &SbkObjectType_Type) {
- SbkObjectType* objType = reinterpret_cast<SbkObjectType*>(type);
- Q_ASSERT(objType->original_name);
- typeName = strdup(objType->original_name);
+ if (type->ob_type == &SbkBaseType_Type) {
+ SbkBaseType* objType = reinterpret_cast<SbkBaseType*>(type);
+ typeName = strdup(Shiboken::BaseType::getOriginalName(objType));
} else {
// Translate python types to Qt names
PyTypeObject *objType = reinterpret_cast<PyTypeObject*>(type);
@@ -670,7 +669,7 @@ PyObject* buildQtCompatible(const char* signature)
return ret;
}
-void addSignalToWrapper(SbkObjectType* wrapperType, const char* signalName, PySideSignal* signal)
+void addSignalToWrapper(SbkBaseType* wrapperType, const char* signalName, PySideSignal* signal)
{
PyObject* typeDict = wrapperType->super.ht_type.tp_dict;
PyObject* homonymousMethod;
diff --git a/libpyside/pysidesignal.h b/libpyside/pysidesignal.h
index cc4a862..e578ae7 100644
--- a/libpyside/pysidesignal.h
+++ b/libpyside/pysidesignal.h
@@ -29,8 +29,7 @@
#include <pysidemacros.h>
#include <Python.h>
-
-struct SbkObjectType;
+#include <basewrapper.h>
extern "C"
{
@@ -108,7 +107,7 @@ PYSIDE_API void updateSourceObject(PyObject* source);
* @param self The Signal object
* @return Return the signal signature
**/
-PYSIDE_API void addSignalToWrapper(SbkObjectType* wrapperType, const char* signalName, PySideSignal* signal);
+PYSIDE_API void addSignalToWrapper(SbkBaseType* wrapperType, const char* signalName, PySideSignal* signal);
/**
* This function verify if the signature is a QtSignal base on SIGNAL flag