diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-11-23 15:04:27 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-11-23 15:04:27 -0200 |
commit | f31d9107555376e60757b9c8054030e2cf7bddad (patch) | |
tree | 9507ec8beeaf12ac46210c89e4827104a33f0cbe /PySide/QtGui/glue | |
parent | e635023cdb91452e719f16afb70d3d19b01aed34 (diff) | |
parent | a8ae0680f23ca5e702a662cf36a465b7a7b2788a (diff) |
Merge branch 'apichanges'
Reviewer: Renato Araújo <renato.filho@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
Conflicts:
libpyside/pyside.cpp
Diffstat (limited to 'PySide/QtGui/glue')
-rw-r--r-- | PySide/QtGui/glue/qapplication_init.cpp | 10 | ||||
-rw-r--r-- | PySide/QtGui/glue/qlayout_help_functions.h | 10 | ||||
-rw-r--r-- | PySide/QtGui/glue/qwidget_glue.h | 8 |
3 files changed, 14 insertions, 14 deletions
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<QApplication>())) + if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType<QApplication>())) return -1; if (QApplication::instance()) { @@ -28,12 +28,12 @@ int Sbk_QApplication_Init(PyObject* self, PyObject* args, PyObject*) SbkObject* sbkSelf = reinterpret_cast<SbkObject*>(self); QApplicationWrapper* cptr = new QApplicationWrapper(QApplicationArgCount, QApplicationArgValues); - Shiboken::Wrapper::setCppPointer(sbkSelf, + Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType<QApplication>(), 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 bb3c3f8c9..8420cb3ac 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<QWidget*>::toPython(layout)); Shiboken::AutoDecRef pyChild(Shiboken::Converter<QWidget*>::toPython(widget)); - Shiboken::Wrapper::keepReference(reinterpret_cast<SbkObject*>(pyParent.object()), retrieveObjectName(pyParent).data(), pyChild, true); + Shiboken::Object::keepReference(reinterpret_cast<SbkObject*>(pyParent.object()), retrieveObjectName(pyParent).data(), pyChild, true); } else { Shiboken::AutoDecRef pyParent(Shiboken::Converter<QWidget*>::toPython(parent)); Shiboken::AutoDecRef pyChild(Shiboken::Converter<QWidget*>::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<QLayout*>::toPython(layout)); Shiboken::AutoDecRef pyChild(Shiboken::Converter<QLayout*>::toPython(other)); - Shiboken::Wrapper::keepReference(reinterpret_cast<SbkObject*>(pyParent.object()), retrieveObjectName(pyParent).data(), pyChild, true); + Shiboken::Object::keepReference(reinterpret_cast<SbkObject*>(pyParent.object()), retrieveObjectName(pyParent).data(), pyChild, true); return; } @@ -48,7 +48,7 @@ inline void addLayoutOwnership(QLayout* layout, QLayout* other) Shiboken::AutoDecRef pyParent(Shiboken::Converter<QLayout*>::toPython(layout)); Shiboken::AutoDecRef pyChild(Shiboken::Converter<QLayout*>::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<QLayout*>::toPython(layout)); Shiboken::AutoDecRef pyChild(Shiboken::Converter<QLayoutItem*>::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<QWidget*>::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<QLayout*>::toPython(layout)); - Shiboken::Wrapper::setParent(pyParent, pyChild); + Shiboken::Object::setParent(pyParent, pyChild); //remove previous references - Shiboken::Wrapper::keepReference(reinterpret_cast<SbkObject*>(pyChild.object()), qPrintable(retrieveObjectName(pyChild)), Py_None); + Shiboken::Object::keepReference(reinterpret_cast<SbkObject*>(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<QLayout*>::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())); |