aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtGui
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-11-23 14:37:16 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-11-23 14:37:16 -0200
commita8ae0680f23ca5e702a662cf36a465b7a7b2788a (patch)
tree13257f86b17d96261cd8713463bf75c14d507cbf /PySide/QtGui
parent6cefd33cd08232b25a3b81d598b88ec47aa5aad2 (diff)
Adapt to API changes in libshiboken.
Diffstat (limited to 'PySide/QtGui')
-rw-r--r--PySide/QtGui/glue/qapplication_init.cpp10
-rw-r--r--PySide/QtGui/glue/qlayout_help_functions.h10
-rw-r--r--PySide/QtGui/glue/qwidget_glue.h8
-rw-r--r--PySide/QtGui/qpixmap_conversion.h16
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml34
5 files changed, 39 insertions, 39 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 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<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()));
diff --git a/PySide/QtGui/qpixmap_conversion.h b/PySide/QtGui/qpixmap_conversion.h
index f6a2e58eb..fc49af6be 100644
--- a/PySide/QtGui/qpixmap_conversion.h
+++ b/PySide/QtGui/qpixmap_conversion.h
@@ -8,15 +8,15 @@ inline bool Converter<QPixmap>::isConvertible(PyObject* pyobj)
{
if (ValueTypeConverter<QPixmap>::isConvertible(pyobj))
return true;
- SbkBaseType* shiboType = reinterpret_cast<SbkBaseType*>(SbkType<QPixmap>());
- bool isVariant = Converter<QVariant>::checkType(pyobj);
+ SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType<QPixmap>());
+ bool isVariant = Shiboken::Converter<QVariant>::checkType(pyobj);
if (isVariant) {
- QVariant var(Converter<QVariant>::toCpp(pyobj));
+ QVariant var(Shiboken::Converter<QVariant>::toCpp(pyobj));
return var.type() == QVariant::Pixmap;
- } else if (Converter<QSize>::checkType(pyobj) || Converter<QString>::checkType(pyobj)) {
+ } else if (Shiboken::Converter<QSize>::checkType(pyobj) || Shiboken::Converter<QString>::checkType(pyobj)) {
return true;
} else {
- return Shiboken::BaseType::isExternalConvertible(shiboType, pyobj);
+ return Shiboken::ObjectType::isExternalConvertible(shiboType, pyobj);
}
return false;
@@ -24,7 +24,7 @@ inline bool Converter<QPixmap>::isConvertible(PyObject* pyobj)
inline QPixmap Converter<QPixmap>::toCpp(PyObject* pyobj)
{
- SbkBaseType* shiboType = reinterpret_cast<SbkBaseType*>(SbkType<QPixmap>());
+ SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType<QPixmap>());
bool isVariant = Converter<QVariant>::checkType(pyobj);
if (isVariant) {
QVariant var(Converter<QVariant>::toCpp(pyobj));
@@ -33,8 +33,8 @@ inline QPixmap Converter<QPixmap>::toCpp(PyObject* pyobj)
return QPixmap(Shiboken::Converter<QSize >::toCpp(pyobj));
} else if (Converter<QString>::checkType(pyobj)) {
return QPixmap(Shiboken::Converter<QString >::toCpp(pyobj));
- } else if (Shiboken::BaseType::isExternalConvertible(shiboType, pyobj) && Shiboken::BaseType::hasExternalCppConversions(shiboType)) {
- QPixmap* cptr = reinterpret_cast<QPixmap*>(Shiboken::BaseType::callExternalCppConversion(shiboType, pyobj));
+ } else if (Shiboken::ObjectType::isExternalConvertible(shiboType, pyobj) && Shiboken::ObjectType::hasExternalCppConversions(shiboType)) {
+ QPixmap* cptr = reinterpret_cast<QPixmap*>(Shiboken::ObjectType::callExternalCppConversion(shiboType, pyobj));
std::auto_ptr<QPixmap> cptr_auto_ptr(cptr);
return *cptr;
}
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml
index d9f75745b..a5f22d835 100644
--- a/PySide/QtGui/typesystem_gui_common.xml
+++ b/PySide/QtGui/typesystem_gui_common.xml
@@ -526,7 +526,7 @@
<add-function signature="value()" return-type="QTreeWidgetItem*">
<inject-code>
%PYARG_0 = %CONVERTTOPYTHON[QTreeWidgetItem*](%CPPSELF.operator*());
- Shiboken::Wrapper::releaseOwnership(%PYARG_0);
+ Shiboken::Object::releaseOwnership(%PYARG_0);
</inject-code>
</add-function>
<enum-type name="IteratorFlag" flags="QTreeWidgetItemIterator::IteratorFlags"/>
@@ -1621,7 +1621,7 @@
<reference-count action="add"/>
</modify-argument>
<inject-code>
- Shiboken::Wrapper::releaseOwnership(%PYARG_2);
+ Shiboken::Object::releaseOwnership(%PYARG_2);
</inject-code>
</modify-function>
<modify-function signature="setDefaultFactory(QItemEditorFactory *)">
@@ -1955,7 +1955,7 @@
<inject-code class="target" position="end">
Shiboken::AutoDecRef result(PyObject_CallMethod(%PYSELF, "connect", "OsO", %PYSELF, SIGNAL(activated()), %PYARG_3));
if (!result.isNull())
- Shiboken::Wrapper::setParent(%PYARG_2, %PYSELF);
+ Shiboken::Object::setParent(%PYARG_2, %PYSELF);
</inject-code>
</add-function>
</object-type>
@@ -2018,7 +2018,7 @@
QStandardItem* _i = %CPPSELF->child(%1, %2);
if (_i) {
PyObject* _pyI = %CONVERTTOPYTHON[QStandardItem*](_i);
- Shiboken::Wrapper::setParent(0, _pyI);
+ Shiboken::Object::setParent(0, _pyI);
}
</inject-code>
<modify-argument index="3">
@@ -2031,7 +2031,7 @@
QStandardItem* _i = %CPPSELF->child(%1);
if (_i) {
PyObject* _pyI = %CONVERTTOPYTHON[QStandardItem*](_i);
- Shiboken::Wrapper::setParent(0, _pyI);
+ Shiboken::Object::setParent(0, _pyI);
}
</inject-code>
<modify-argument index="2">
@@ -2170,7 +2170,7 @@
QWidget *_widget = %CPPSELF.widget(%1);
if (_widget) {
Shiboken::AutoDecRef pyWidget(%CONVERTTOPYTHON[QWidget*](_widget));
- Shiboken::Wrapper::setParent(0, pyWidget);
+ Shiboken::Object::setParent(0, pyWidget);
}
</inject-code>
</modify-function>
@@ -3317,7 +3317,7 @@
<modify-function signature="setStyle(QStyle*)">
<inject-code class="target" position="end">
- Shiboken::Wrapper::keepReference(reinterpret_cast&lt;SbkObject*&gt;(%PYSELF), "__style__", %PYARG_1);
+ Shiboken::Object::keepReference(reinterpret_cast&lt;SbkObject*&gt;(%PYSELF), "__style__", %PYARG_1);
</inject-code>
</modify-function>
<modify-function signature="style()const">
@@ -3328,10 +3328,10 @@
QStyle *appStyle = qApp->style();
if (appStyle == myStyle) {
Shiboken::AutoDecRef pyApp(%CONVERTTOPYTHON[QApplication*](qApp));
- Shiboken::Wrapper::setParent(pyApp, %PYARG_0);
- Shiboken::Wrapper::releaseOwnership(%PYARG_0);
+ Shiboken::Object::setParent(pyApp, %PYARG_0);
+ Shiboken::Object::releaseOwnership(%PYARG_0);
} else {
- Shiboken::Wrapper::keepReference(reinterpret_cast&lt;SbkObject*&gt;(%PYSELF), "__style__", %PYARG_0);
+ Shiboken::Object::keepReference(reinterpret_cast&lt;SbkObject*&gt;(%PYSELF), "__style__", %PYARG_0);
}
}
</inject-code>
@@ -3586,7 +3586,7 @@
QWidget* tab = %CPPSELF.widget(%1);
if (tab) {
Shiboken::AutoDecRef pyWidget(%CONVERTTOPYTHON[QWidget*](tab));
- Shiboken::Wrapper::setParent(0, pyWidget);
+ Shiboken::Object::setParent(0, pyWidget);
%CPPSELF.%FUNCTION_NAME(%1);
}
</inject-code>
@@ -3595,7 +3595,7 @@
<inject-code class="target" position="beginning">
for (int i=0; i &lt; %CPPSELF.count(); i++) {
Shiboken::AutoDecRef pyWidget(%CONVERTTOPYTHON[QWidget*](%CPPSELF.widget(i)));
- Shiboken::Wrapper::setParent(0, pyWidget);
+ Shiboken::Object::setParent(0, pyWidget);
}
%CPPSELF.%FUNCTION_NAME();
</inject-code>
@@ -3853,7 +3853,7 @@
QStandardItem* _i = %CPPSELF->item(%1, %2);
if (_i) {
PyObject* _pyI = %CONVERTTOPYTHON[QStandardItem*](_i);
- Shiboken::Wrapper::setParent(0, _pyI);
+ Shiboken::Object::setParent(0, _pyI);
}
</inject-code>
<modify-argument index="3">
@@ -3866,7 +3866,7 @@
QStandardItem* _i = %CPPSELF->item(%1);
if (_i) {
PyObject* _pyI = %CONVERTTOPYTHON[QStandardItem*](_i);
- Shiboken::Wrapper::setParent(0, _pyI);
+ Shiboken::Object::setParent(0, _pyI);
}
</inject-code>
<modify-argument index="2">
@@ -3885,7 +3885,7 @@
QStandardItem* _i = %CPPSELF->verticalHeaderItem(%1);
if (_i) {
PyObject* _pyI = %CONVERTTOPYTHON[QStandardItem*](_i);
- Shiboken::Wrapper::setParent(0, _pyI);
+ Shiboken::Object::setParent(0, _pyI);
}
</inject-code>
<modify-argument index="2">
@@ -3935,7 +3935,7 @@
QList&lt;QStandardItem *&gt; ri = %CPPSELF.takeRow(0);
PyObject *pyResult = %CONVERTTOPYTHON[QList&lt;QStandardItem * &gt;](ri);
- Shiboken::Wrapper::setParent(Py_None, pyResult);
+ Shiboken::Object::setParent(Py_None, pyResult);
Py_XDECREF(pyResult);
}
</inject-code>
@@ -4554,7 +4554,7 @@
<!-- ownership control transfer to qApp -->
<modify-function signature="setStyle(QStyle*)">
<inject-code class="target" position="end">
- Shiboken::Wrapper::setParent(%CONVERTTOPYTHON[QApplication*](qApp), %PYARG_1);
+ Shiboken::Object::setParent(%CONVERTTOPYTHON[QApplication*](qApp), %PYARG_1);
</inject-code>
</modify-function>
<modify-function signature="style()">