summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--PySide/QtCore/glue/qbytearray_bufferprotocol.cpp2
-rw-r--r--PySide/QtCore/glue/qcoreapplication_init.cpp21
-rw-r--r--PySide/QtCore/glue/qobject_connect.cpp4
-rw-r--r--PySide/QtCore/qvariant_conversions.h6
-rw-r--r--PySide/QtCore/qvariant_type_conversions.h4
-rw-r--r--PySide/QtCore/typesystem_core.xml10
-rw-r--r--libpyside/pyside.cpp8
-rw-r--r--libpyside/pysideconversions.h8
-rw-r--r--libpyside/pysidesignal.cpp6
-rw-r--r--libpyside/pysidesignal.h27
-rw-r--r--libpyside/signalmanager.cpp8
-rw-r--r--plugins/customwidget.cpp12
13 files changed, 58 insertions, 60 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 19938a1..5a6f6f5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 2.6)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Macros/
${CMAKE_MODULE_PATH})
find_package(GeneratorRunner 0.6.3 REQUIRED)
-find_package(Shiboken 0.5.2 REQUIRED)
+find_package(Shiboken 1.0.0 REQUIRED)
find_package(Qt4 4.5.0 REQUIRED)
include(FindQt4Extra)
diff --git a/PySide/QtCore/glue/qbytearray_bufferprotocol.cpp b/PySide/QtCore/glue/qbytearray_bufferprotocol.cpp
index 4fd1587..19ee4e7 100644
--- a/PySide/QtCore/glue/qbytearray_bufferprotocol.cpp
+++ b/PySide/QtCore/glue/qbytearray_bufferprotocol.cpp
@@ -15,7 +15,7 @@ static Py_ssize_t SbkQByteArray_segcountproc(PyObject* self, Py_ssize_t* lenp)
static Py_ssize_t SbkQByteArray_readbufferproc(PyObject* self, Py_ssize_t segment, void** ptrptr)
{
- if (segment || Shiboken::cppObjectIsInvalid(self))
+ if (segment || !Shiboken::Wrapper::isValid(self))
return -1;
QByteArray* cppSelf = Converter<QByteArray*>::toCpp(self);
diff --git a/PySide/QtCore/glue/qcoreapplication_init.cpp b/PySide/QtCore/glue/qcoreapplication_init.cpp
index 8ae53f3..274afb6 100644
--- a/PySide/QtCore/glue/qcoreapplication_init.cpp
+++ b/PySide/QtCore/glue/qcoreapplication_init.cpp
@@ -2,7 +2,7 @@
static int QCoreApplicationArgCount;
static char** QCoreApplicationArgValues;
-int SbkQCoreApplication_Init(PyObject* self, PyObject* args, PyObject*)
+int Sbk_QCoreApplication_Init(PyObject* self, PyObject* args, PyObject*)
{
if (Shiboken::isUserType(self) && !Shiboken::canCallConstructor(self->ob_type, Shiboken::SbkType<QApplication >()))
return -1;
@@ -19,20 +19,21 @@ int SbkQCoreApplication_Init(PyObject* self, PyObject* args, PyObject*)
return -1;
}
- if (!PySequenceToArgcArgv(PyTuple_GET_ITEM(args, 0), &QCoreApplicationArgCount, &QCoreApplicationArgValues, "PySideApp")) {
+ if (!Shiboken::sequenceToArgcArgv(PyTuple_GET_ITEM(args, 0), &QCoreApplicationArgCount, &QCoreApplicationArgValues, "PySideApp")) {
PyErr_BadArgument();
return -1;
}
+ SbkObject* sbkSelf = reinterpret_cast<SbkObject*>(self);
QCoreApplicationWrapper* cptr = new QCoreApplicationWrapper(QCoreApplicationArgCount, QCoreApplicationArgValues);
- Shiboken::setCppPointer(reinterpret_cast<SbkBaseWrapper*>(self),
- Shiboken::SbkType<QCoreApplication>(),
- cptr);
-
- SbkBaseWrapper_setValidCppObject(self, 1);
- SbkBaseWrapper *sbkSelf = reinterpret_cast<SbkBaseWrapper*>(self);
- sbkSelf->containsCppWrapper = 1;
- sbkSelf->hasOwnership = 0;
+ Shiboken::Wrapper::setCppPointer(sbkSelf,
+ Shiboken::SbkType<QCoreApplication>(),
+ cptr);
+
+ Shiboken::Wrapper::setValidCpp(sbkSelf, true);
+ Shiboken::Wrapper::setHasCppWrapper(sbkSelf, true);
+ Shiboken::Wrapper::releaseOwnership(sbkSelf);
+
Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);
PySide::Signal::updateSourceObject(self);
cptr->metaObject();
diff --git a/PySide/QtCore/glue/qobject_connect.cpp b/PySide/QtCore/glue/qobject_connect.cpp
index 7702655..dea4440 100644
--- a/PySide/QtCore/glue/qobject_connect.cpp
+++ b/PySide/QtCore/glue/qobject_connect.cpp
@@ -1,4 +1,4 @@
-static bool getReceiver(PyObject *callback, QObject **receiver, PyObject **self)
+static bool getReceiver(PyObject* callback, QObject** receiver, PyObject** self)
{
if (PyMethod_Check(callback)) {
*self = PyMethod_GET_SELF(callback);
@@ -66,7 +66,7 @@ static bool qobjectConnectCallback(QObject* source, const char* signal, PyObject
const char* slot = callbackSig.constData();
int slotIndex = metaObject->indexOfSlot(slot);
if (slotIndex == -1) {
- if (!usingGlobalReceiver && self && !((SbkBaseWrapper*)self)->containsCppWrapper) {
+ if (!usingGlobalReceiver && self && !Shiboken::Wrapper::hasCppWrapper((SbkObject*)self)) {
qWarning() << "You can't add dynamic slots on an object originated from C++.";
return false;
}
diff --git a/PySide/QtCore/qvariant_conversions.h b/PySide/QtCore/qvariant_conversions.h
index b47e389..6c7ebd7 100644
--- a/PySide/QtCore/qvariant_conversions.h
+++ b/PySide/QtCore/qvariant_conversions.h
@@ -16,8 +16,8 @@ struct Converter<QVariant>
static QByteArray resolveMetaType(PyTypeObject* type, int &typeId)
{
- if (PyObject_TypeCheck(type, &Shiboken::SbkBaseWrapperType_Type)) {
- Shiboken::SbkBaseWrapperType *sbkType = reinterpret_cast<Shiboken::SbkBaseWrapperType*>(type);
+ if (PyObject_TypeCheck(type, &SbkObjectType_Type)) {
+ SbkObjectType* sbkType = reinterpret_cast<SbkObjectType*>(type);
const char* typeName = sbkType->original_name;
int obTypeId = QMetaType::type(typeName);
@@ -82,7 +82,7 @@ struct Converter<QVariant>
} else {
// a class supported by QVariant?
if (Shiboken::isShibokenType(pyObj) && !Shiboken::isUserType(pyObj)) {
- Shiboken::SbkBaseWrapperType *objType = reinterpret_cast<Shiboken::SbkBaseWrapperType*>(pyObj->ob_type);
+ SbkObjectType* objType = reinterpret_cast<SbkObjectType*>(pyObj->ob_type);
int typeCode = 0;
QByteArray typeName = resolveMetaType(reinterpret_cast<PyTypeObject*>(objType), typeCode);
if (typeCode) {
diff --git a/PySide/QtCore/qvariant_type_conversions.h b/PySide/QtCore/qvariant_type_conversions.h
index e5384cd..4ec4765 100644
--- a/PySide/QtCore/qvariant_type_conversions.h
+++ b/PySide/QtCore/qvariant_type_conversions.h
@@ -26,8 +26,8 @@ struct Converter<QVariant::Type>
else if (pyObj == reinterpret_cast<PyObject*>(&PyLong_Type))
typeName = "int"; // long is a UserType in QVariant.
else if (PyType_Check(pyObj)) {
- if (pyObj->ob_type == &Shiboken::SbkBaseWrapperType_Type)
- typeName = reinterpret_cast<Shiboken::SbkBaseWrapperType*>(pyObj)->original_name;
+ if (pyObj->ob_type == &SbkObjectType_Type)
+ typeName = reinterpret_cast<SbkObjectType*>(pyObj)->original_name;
else
typeName = reinterpret_cast<PyTypeObject*>(pyObj)->tp_name;
}
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index 366fd9c..f521607 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -1061,7 +1061,7 @@
<add-function signature="__setitem__">
<inject-code class="target" position="beginning">
PyObject* args = Py_BuildValue("(iiO)", _i, 1, _value);
- PyObject* result = SbkQBitArrayFunc_setBit(self, args);
+ PyObject* result = Sbk_QBitArrayFunc_setBit(self, args);
Py_DECREF(args);
Py_XDECREF(result);
return !result ? -1 : 0;
@@ -1700,7 +1700,7 @@
<inject-code class="target" position="beginning">
%CPPSELF.remove(_i, 1);
PyObject* args = Py_BuildValue("(nO)", _i, _value);
- PyObject* result = SbkQByteArrayFunc_insert(self, args);
+ PyObject* result = Sbk_QByteArrayFunc_insert(self, args);
Py_DECREF(args);
Py_XDECREF(result);
return !result ? -1 : 0;
@@ -1940,7 +1940,7 @@
%3)
);
// invalidate to avoid use of python object
- Shiboken::BindingManager::instance().destroyWrapper((Shiboken::SbkBaseWrapper *)pyTimer);
+ Shiboken::BindingManager::instance().destroyWrapper((SbkObject*)pyTimer);
timer->setSingleShot(true);
timer->connect(timer, SIGNAL("timeout()"), timer, SLOT("deleteLater()"));
timer->start(%1);
@@ -1978,7 +1978,7 @@
pyargs[1])
);
}
- Shiboken::BindingManager::instance().destroyWrapper((Shiboken::SbkBaseWrapper *)pyTimer);
+ Shiboken::BindingManager::instance().destroyWrapper((SbkObject*)pyTimer);
timer->start(%1);
</inject-code>
</add-function>
@@ -2680,7 +2680,7 @@
// Check bug #362 for more information on this
// http://bugs.openbossa.org/show_bug.cgi?id=362
if (!PyObject_TypeCheck(%1, &amp;PySideSignalInstanceType))
- goto Sbk%TYPEFunc_%FUNCTION_NAME_TypeError;
+ goto Sbk_%TYPEFunc_%FUNCTION_NAME_TypeError;
PySideSignalInstance* signalInstance = reinterpret_cast&lt;PySideSignalInstance*&gt;(%1);
QObject* sender = %CONVERTTOCPP[QObject*](PySide::Signal::getObject(signalInstance));
%PYARG_0 = %CONVERTTOPYTHON[QSignalTransition*](%CPPSELF->%FUNCTION_NAME(sender, PySide::Signal::getSignature(signalInstance), %2));
diff --git a/libpyside/pyside.cpp b/libpyside/pyside.cpp
index 7f2e96a..7866fc6 100644
--- a/libpyside/pyside.cpp
+++ b/libpyside/pyside.cpp
@@ -110,15 +110,15 @@ void destroyQCoreApplication()
return;
Shiboken::BindingManager& bm = Shiboken::BindingManager::instance();
- PyObject* pyQApp = bm.retrieveWrapper(app);
+ SbkObject* pyQApp = bm.retrieveWrapper(app);
PyTypeObject* pyQObjectType = Shiboken::TypeResolver::get("QObject*")->pythonType();
assert(pyQObjectType);
- foreach (PyObject* pyObj, bm.getAllPyObjects()) {
+ foreach (SbkObject* pyObj, bm.getAllPyObjects()) {
if (pyObj != pyQApp && PyObject_TypeCheck(pyObj, pyQObjectType)) {
- if (SbkBaseWrapper_hasOwnership(pyObj)) {
+ if (Shiboken::Wrapper::hasOwnership(pyObj)) {
bm.destroyWrapper(pyObj);
- delete static_cast<QObject*>(Shiboken::getCppPointer(pyObj, Shiboken::SbkType<QObject*>()));
+ delete static_cast<QObject*>(Shiboken::Wrapper::cppPointer(pyObj, Shiboken::SbkType<QObject*>()));
}
}
}
diff --git a/libpyside/pysideconversions.h b/libpyside/pysideconversions.h
index e92828a..e8c70dc 100644
--- a/libpyside/pysideconversions.h
+++ b/libpyside/pysideconversions.h
@@ -73,7 +73,7 @@ struct QtDictConverter
static inline QtDict toCpp(PyObject* pyobj)
{
if (PyObject_TypeCheck(pyobj, Shiboken::SbkType<QtDict>()))
- return *reinterpret_cast<QtDict*>(Shiboken::getCppPointer(pyobj, Shiboken::SbkType<QtDict>()));
+ return *reinterpret_cast<QtDict*>(Shiboken::Wrapper::cppPointer((SbkObject*)pyobj, Shiboken::SbkType<QtDict>()));
QtDict result;
@@ -150,7 +150,7 @@ struct QtMultiMapConverter
static inline MultiMap toCpp(PyObject* pyObj)
{
if (PyObject_TypeCheck(pyObj, Shiboken::SbkType<MultiMap>()))
- return *reinterpret_cast<MultiMap*>(Shiboken::getCppPointer(pyObj, Shiboken::SbkType<MultiMap>()));
+ return *reinterpret_cast<MultiMap*>(Shiboken::Wrapper::cppPointer((SbkObject*)pyObj, Shiboken::SbkType<MultiMap>()));
MultiMap result;
@@ -199,7 +199,7 @@ struct QSequenceConverter
static T toCpp(PyObject* pyobj)
{
if (PyObject_TypeCheck(pyobj, Shiboken::SbkType<T>()))
- return *reinterpret_cast<T*>(Shiboken::getCppPointer(pyobj, Shiboken::SbkType<T>()));
+ return *reinterpret_cast<T*>(Shiboken::Wrapper::cppPointer((SbkObject*)pyobj, Shiboken::SbkType<T>()));
Shiboken::AutoDecRef fastSequence(PySequence_Fast(pyobj, "Invalid sequence object"));
T result;
@@ -240,7 +240,7 @@ struct QFlagsConverter
static inline T toCpp(PyObject* pyObj)
{
if (Shiboken::isShibokenEnum(pyObj))
- return T(QFlag(reinterpret_cast<Shiboken::SbkEnumObject*>(pyObj)->ob_ival));
+ return T(QFlag(Shiboken::Enum::getValue(pyObj)));
else
return T(QFlag(reinterpret_cast<PyIntObject*>(pyObj)->ob_ival));
}
diff --git a/libpyside/pysidesignal.cpp b/libpyside/pysidesignal.cpp
index 41750aa..81d23dd 100644
--- a/libpyside/pysidesignal.cpp
+++ b/libpyside/pysidesignal.cpp
@@ -493,8 +493,8 @@ char* getTypeName(PyObject* type)
{
if (PyType_Check(type)) {
char *typeName = NULL;
- if (type->ob_type == &Shiboken::SbkBaseWrapperType_Type) {
- Shiboken::SbkBaseWrapperType *objType = reinterpret_cast<Shiboken::SbkBaseWrapperType*>(type);
+ if (type->ob_type == &SbkObjectType_Type) {
+ SbkObjectType* objType = reinterpret_cast<SbkObjectType*>(type);
Q_ASSERT(objType->original_name);
typeName = strdup(objType->original_name);
} else {
@@ -670,7 +670,7 @@ PyObject* buildQtCompatible(const char* signature)
return ret;
}
-void addSignalToWrapper(Shiboken::SbkBaseWrapperType* wrapperType, const char* signalName, PySideSignal* signal)
+void addSignalToWrapper(SbkObjectType* wrapperType, const char* signalName, PySideSignal* signal)
{
PyObject* typeDict = wrapperType->super.ht_type.tp_dict;
PyObject* homonymousMethod;
diff --git a/libpyside/pysidesignal.h b/libpyside/pysidesignal.h
index 8a590a1..cc4a862 100644
--- a/libpyside/pysidesignal.h
+++ b/libpyside/pysidesignal.h
@@ -30,10 +30,7 @@
#include <pysidemacros.h>
#include <Python.h>
-namespace Shiboken
-{
- struct SbkBaseWrapperType;
-}
+struct SbkObjectType;
extern "C"
{
@@ -60,7 +57,7 @@ namespace PySide { namespace Signal {
* @param signatures a list of signatures supported by this signal, ended with a NULL pointer
* @return Return a new reference to PyObject* of type PySideSignal
**/
-PYSIDE_API PySideSignal* newObject(const char* name, ...);
+PYSIDE_API PySideSignal* newObject(const char* name, ...);
/**
* This function creates a Signal object which stay attached to QObject class based on a list of QMetaMethod
@@ -69,7 +66,7 @@ PYSIDE_API PySideSignal* newObject(const char* name, ...);
* @param methods a list of QMetaMethod wich contains the supported signature
* @return Return a new reference to PyObject* of type PySideSignal
**/
-PYSIDE_API PySideSignalInstance* newObjectFromMethod(PyObject* source, const QList<QMetaMethod>& methods);
+PYSIDE_API PySideSignalInstance* newObjectFromMethod(PyObject* source, const QList<QMetaMethod>& methods);
/**
* This function initializes the Signal object creating a PySideSignalInstance
@@ -79,7 +76,7 @@ PYSIDE_API PySideSignalInstance* newObjectFromMethod(PyObject* source, const
* @param object the PyObject where the signal will be attached
* @return Return a new reference to PySideSignalInstance
**/
-PYSIDE_API PySideSignalInstance* initialize(PySideSignal* signal, PyObject* name, PyObject *object);
+PYSIDE_API PySideSignalInstance* initialize(PySideSignal* signal, PyObject* name, PyObject *object);
/**
* This function is used to retrieve the object in which the sigal is attached
@@ -87,7 +84,7 @@ PYSIDE_API PySideSignalInstance* initialize(PySideSignal* signal, PyObject* n
* @param self The Signal object
* @return Return the internal reference to parent object of the signal
**/
-PYSIDE_API PyObject* getObject(PySideSignalInstance* signal);
+PYSIDE_API PyObject* getObject(PySideSignalInstance* signal);
/**
* This function is used to retrieve the signal signature
@@ -95,7 +92,7 @@ PYSIDE_API PyObject* getObject(PySideSignalInstance* signal);
* @param self The Signal object
* @return Return the signal signature
**/
-PYSIDE_API const char* getSignature(PySideSignalInstance* signal);
+PYSIDE_API const char* getSignature(PySideSignalInstance* signal);
/**
* This function is used to retrieve the signal signature
@@ -103,7 +100,7 @@ PYSIDE_API const char* getSignature(PySideSignalInstance* signal);
* @param self The Signal object
* @return Return the signal signature
**/
-PYSIDE_API void updateSourceObject(PyObject* source);
+PYSIDE_API void updateSourceObject(PyObject* source);
/**
* This function is used to retrieve the signal signature
@@ -111,21 +108,21 @@ PYSIDE_API void updateSourceObject(PyObject* source);
* @param self The Signal object
* @return Return the signal signature
**/
-PYSIDE_API void addSignalToWrapper(Shiboken::SbkBaseWrapperType* wrapperType, const char* signalName, PySideSignal* signal);
+PYSIDE_API void addSignalToWrapper(SbkObjectType* wrapperType, const char* signalName, PySideSignal* signal);
/**
* This function verify if the signature is a QtSignal base on SIGNAL flag
* @param signature The signal signature
* @return Return true if this is a Qt Signal of false if not
**/
-PYSIDE_API bool isQtSignal(const char* signature);
+PYSIDE_API bool isQtSignal(const char* signature);
/**
* This function is similar as isQtSignal but this reaise a Python error if this faisl
* @param signature The signal signature
* @return Return true if this is a Qt Signal of false if not
**/
-PYSIDE_API bool checkQtSignal(const char* signature);
+PYSIDE_API bool checkQtSignal(const char* signature);
/**
* This function is used to retrieve the signature base on Signal and receiver callback
@@ -135,7 +132,7 @@ PYSIDE_API bool checkQtSignal(const char* signature);
* @param encodeName Used to specify if the returned signature will be encoded with Qt signal/slot style
* @return Return the callback signature
**/
-PYSIDE_API QString getCallbackSignature(const char* signal, QObject* receiver, PyObject* callback, bool encodeName);
+PYSIDE_API QString getCallbackSignature(const char* signal, QObject* receiver, PyObject* callback, bool encodeName);
/**
* Function to parese the signature and return a list of argument types
@@ -143,7 +140,7 @@ PYSIDE_API QString getCallbackSignature(const char* signal, QOb
* @param isShortCircuit If this is a shortCircuit(python<->python) signal
* @return Return true if this is a Qt Signal of false if not
**/
-QStringList getArgsFromSignature(const char* signature, bool* isShortCircuit = 0);
+QStringList getArgsFromSignature(const char* signature, bool* isShortCircuit = 0);
} //namespace Signal
} //namespace PySide
diff --git a/libpyside/signalmanager.cpp b/libpyside/signalmanager.cpp
index 8765136..c08c529 100644
--- a/libpyside/signalmanager.cpp
+++ b/libpyside/signalmanager.cpp
@@ -251,7 +251,7 @@ int SignalManager::qt_metacall(QObject* object, QMetaObject::Call call, int id,
return id - metaObject->methodCount();
Shiboken::GilState gil;
- pySelf = Shiboken::BindingManager::instance().retrieveWrapper(object);
+ pySelf = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(object);
Q_ASSERT(pySelf);
pp_name = PyString_FromString(mp.name());
pp = Property::getObject(pySelf, pp_name);
@@ -334,7 +334,7 @@ static int PySide::callMethod(QObject* object, int id, void** args)
// call python slot
Shiboken::GilState gil;
QList<QByteArray> paramTypes = method.parameterTypes();
- PyObject* self = Shiboken::BindingManager::instance().retrieveWrapper(object);
+ PyObject* self = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(object);
PyObject* preparedArgs = NULL;
Py_ssize_t args_size = paramTypes.count();
@@ -378,8 +378,8 @@ bool SignalManager::registerMetaMethod(QObject* source, const char* signature, Q
int methodIndex = metaObject->indexOfMethod(signature);
// Create the dynamic signal is needed
if (methodIndex == -1) {
- Shiboken::SbkBaseWrapper* self = (Shiboken::SbkBaseWrapper*) Shiboken::BindingManager::instance().retrieveWrapper(source);
- if (!self->containsCppWrapper) {
+ SbkObject* self = Shiboken::BindingManager::instance().retrieveWrapper(source);
+ if (!Shiboken::Wrapper::hasCppWrapper(self)) {
qWarning() << "Invalid Signal signature:" << signature;
return false;
} else {
diff --git a/plugins/customwidget.cpp b/plugins/customwidget.cpp
index 156b373..6165ebf 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;
}