aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-11-10 17:22:32 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-11-10 17:22:32 -0200
commit92dcb7ae3a92416b4129d549625eba0512e02426 (patch)
tree37d070b8a62502ec8a055d70b7c9d5a7453e179e /plugins
parent66ff08586178ffb601fe874d48b9847fb577f513 (diff)
Changes needed to compile QtCore with libshiboken v1.0
Diffstat (limited to 'plugins')
-rw-r--r--plugins/customwidget.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/customwidget.cpp b/plugins/customwidget.cpp
index 156b37306..6165ebfc9 100644
--- a/plugins/customwidget.cpp
+++ b/plugins/customwidget.cpp
@@ -90,13 +90,13 @@ QString PyCustomWidget::whatsThis() const
return QString();
}
-QWidget *PyCustomWidget::createWidget(QWidget *parent)
+QWidget* PyCustomWidget::createWidget(QWidget* parent)
{
//Create a python instance and return cpp object
PyObject* pyParent;
bool unkowParent = false;
if (parent) {
- pyParent = Shiboken::BindingManager::instance().retrieveWrapper(parent);
+ pyParent = reinterpret_cast<PyObject*>(Shiboken::BindingManager::instance().retrieveWrapper(parent));
if (!pyParent) {
pyParent = Shiboken::Converter<QWidget*>::toPython(parent);
unkowParent = true;
@@ -112,22 +112,22 @@ QWidget *PyCustomWidget::createWidget(QWidget *parent)
PyTuple_SET_ITEM(pyArgs, 0, pyParent); //tuple will keep pyParent reference
//Call python constructor
- PyObject* result = PyObject_CallObject(m_data->pyObject, pyArgs);
+ SbkObject* result = reinterpret_cast<SbkObject*>(PyObject_CallObject(m_data->pyObject, pyArgs));
QWidget* widget = 0;
if (result) {
if (unkowParent) //if parent does not exists in python, transfer the ownership to cpp
Shiboken::BindingManager::instance().transferOwnershipToCpp(result);
else
- Shiboken::setParent(pyParent, result);
+ Shiboken::setParent(pyParent, reinterpret_cast<PyObject*>(result));
- widget = reinterpret_cast<QWidget*>(Shiboken::getCppPointer(result, result->ob_type));
+ widget = reinterpret_cast<QWidget*>(Shiboken::Wrapper::cppPointer(result, result->ob_type));
}
return widget;
}
-void PyCustomWidget::initialize(QDesignerFormEditorInterface *core)
+void PyCustomWidget::initialize(QDesignerFormEditorInterface* core)
{
m_data->initialized = true;
}