From a8ae0680f23ca5e702a662cf36a465b7a7b2788a Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Tue, 23 Nov 2010 14:37:16 -0200 Subject: Adapt to API changes in libshiboken. --- PySide/QtGui/glue/qapplication_init.cpp | 10 +++++----- PySide/QtGui/glue/qlayout_help_functions.h | 10 +++++----- PySide/QtGui/glue/qwidget_glue.h | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) (limited to 'PySide/QtGui/glue') diff --git a/PySide/QtGui/glue/qapplication_init.cpp b/PySide/QtGui/glue/qapplication_init.cpp index b4bf32491..581e4dadf 100644 --- a/PySide/QtGui/glue/qapplication_init.cpp +++ b/PySide/QtGui/glue/qapplication_init.cpp @@ -7,7 +7,7 @@ static const char QAPP_MACRO[] = "qApp"; int Sbk_QApplication_Init(PyObject* self, PyObject* args, PyObject*) { - if (Shiboken::Wrapper::isUserType(self) && !Shiboken::BaseType::canCallConstructor(self->ob_type, Shiboken::SbkType())) + if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType())) return -1; if (QApplication::instance()) { @@ -28,12 +28,12 @@ int Sbk_QApplication_Init(PyObject* self, PyObject* args, PyObject*) SbkObject* sbkSelf = reinterpret_cast(self); QApplicationWrapper* cptr = new QApplicationWrapper(QApplicationArgCount, QApplicationArgValues); - Shiboken::Wrapper::setCppPointer(sbkSelf, + Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType(), cptr); - Shiboken::Wrapper::setValidCpp(sbkSelf, true); - Shiboken::Wrapper::setHasCppWrapper(sbkSelf, true); - Shiboken::Wrapper::releaseOwnership(sbkSelf); + Shiboken::Object::setValidCpp(sbkSelf, true); + Shiboken::Object::setHasCppWrapper(sbkSelf, true); + Shiboken::Object::releaseOwnership(sbkSelf); Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); PySide::Signal::updateSourceObject(self); cptr->metaObject(); diff --git a/PySide/QtGui/glue/qlayout_help_functions.h b/PySide/QtGui/glue/qlayout_help_functions.h index 3361e618a..b0e8a0e5d 100644 --- a/PySide/QtGui/glue/qlayout_help_functions.h +++ b/PySide/QtGui/glue/qlayout_help_functions.h @@ -18,11 +18,11 @@ inline void addLayoutOwnership(QLayout* layout, QWidget* widget) //keep the reference while the layout is orphan Shiboken::AutoDecRef pyParent(Shiboken::Converter::toPython(layout)); Shiboken::AutoDecRef pyChild(Shiboken::Converter::toPython(widget)); - Shiboken::Wrapper::keepReference(reinterpret_cast(pyParent.object()), retrieveObjectName(pyParent).data(), pyChild, true); + Shiboken::Object::keepReference(reinterpret_cast(pyParent.object()), retrieveObjectName(pyParent).data(), pyChild, true); } else { Shiboken::AutoDecRef pyParent(Shiboken::Converter::toPython(parent)); Shiboken::AutoDecRef pyChild(Shiboken::Converter::toPython(widget)); - Shiboken::Wrapper::setParent(pyParent, pyChild); + Shiboken::Object::setParent(pyParent, pyChild); } } @@ -34,7 +34,7 @@ inline void addLayoutOwnership(QLayout* layout, QLayout* other) //keep the reference while the layout is orphan Shiboken::AutoDecRef pyParent(Shiboken::Converter::toPython(layout)); Shiboken::AutoDecRef pyChild(Shiboken::Converter::toPython(other)); - Shiboken::Wrapper::keepReference(reinterpret_cast(pyParent.object()), retrieveObjectName(pyParent).data(), pyChild, true); + Shiboken::Object::keepReference(reinterpret_cast(pyParent.object()), retrieveObjectName(pyParent).data(), pyChild, true); return; } @@ -48,7 +48,7 @@ inline void addLayoutOwnership(QLayout* layout, QLayout* other) Shiboken::AutoDecRef pyParent(Shiboken::Converter::toPython(layout)); Shiboken::AutoDecRef pyChild(Shiboken::Converter::toPython(other)); - Shiboken::Wrapper::setParent(pyParent, pyChild); + Shiboken::Object::setParent(pyParent, pyChild); } @@ -65,7 +65,7 @@ inline void addLayoutOwnership(QLayout* layout, QLayoutItem* item) Shiboken::AutoDecRef pyParent(Shiboken::Converter::toPython(layout)); Shiboken::AutoDecRef pyChild(Shiboken::Converter::toPython(item)); - Shiboken::Wrapper::setParent(pyParent, pyChild); + Shiboken::Object::setParent(pyParent, pyChild); } #endif diff --git a/PySide/QtGui/glue/qwidget_glue.h b/PySide/QtGui/glue/qwidget_glue.h index 469868877..9b20cb5ba 100644 --- a/PySide/QtGui/glue/qwidget_glue.h +++ b/PySide/QtGui/glue/qwidget_glue.h @@ -22,7 +22,7 @@ static inline void qwidgetReparentLayout(QWidget *parent, QLayout *layout) QWidget* pw = w->parentWidget(); if (pw != parent) { Shiboken::AutoDecRef pyChild(Shiboken::Converter::toPython(w)); - Shiboken::Wrapper::setParent(pyParent, pyChild); + Shiboken::Object::setParent(pyParent, pyChild); } } else { QLayout* l = item->layout(); @@ -32,9 +32,9 @@ static inline void qwidgetReparentLayout(QWidget *parent, QLayout *layout) } Shiboken::AutoDecRef pyChild(Shiboken::Converter::toPython(layout)); - Shiboken::Wrapper::setParent(pyParent, pyChild); + Shiboken::Object::setParent(pyParent, pyChild); //remove previous references - Shiboken::Wrapper::keepReference(reinterpret_cast(pyChild.object()), qPrintable(retrieveObjectName(pyChild)), Py_None); + Shiboken::Object::keepReference(reinterpret_cast(pyChild.object()), qPrintable(retrieveObjectName(pyChild)), Py_None); } static inline void qwidgetSetLayout(QWidget *self, QLayout *layout) @@ -47,7 +47,7 @@ static inline void qwidgetSetLayout(QWidget *self, QLayout *layout) if (oldParent->isWidgetType()) { // remove old parent policy Shiboken::AutoDecRef pyLayout(Shiboken::Converter::toPython(layout)); - Shiboken::Wrapper::setParent(Py_None, pyLayout); + Shiboken::Object::setParent(Py_None, pyLayout); } else { PyErr_Format(PyExc_RuntimeError, "QWidget::setLayout: Attempting to set QLayout \"%s\" on %s \"%s\", when the QLayout already has a parent", qPrintable(layout->objectName()), self->metaObject()->className(), qPrintable(self->objectName())); -- cgit v1.2.3