From 92dcb7ae3a92416b4129d549625eba0512e02426 Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Wed, 10 Nov 2010 17:22:32 -0200 Subject: Changes needed to compile QtCore with libshiboken v1.0 --- plugins/customwidget.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins') 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(Shiboken::BindingManager::instance().retrieveWrapper(parent)); if (!pyParent) { pyParent = Shiboken::Converter::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(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(result)); - widget = reinterpret_cast(Shiboken::getCppPointer(result, result->ob_type)); + widget = reinterpret_cast(Shiboken::Wrapper::cppPointer(result, result->ob_type)); } return widget; } -void PyCustomWidget::initialize(QDesignerFormEditorInterface *core) +void PyCustomWidget::initialize(QDesignerFormEditorInterface* core) { m_data->initialized = true; } -- cgit v1.2.3