diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2010-03-30 12:01:10 -0300 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-03-31 15:09:15 -0300 |
commit | 5bd8147956aa7b54af96ce4a0ec9f00afb8fcf88 (patch) | |
tree | ee8cd85236dd5b3fee52d8510c685a86288b9e18 /PySide/QtCore | |
parent | 718dd06ecd8443bc556f68bb17f7958e891ee48b (diff) |
Adapt to changes in libshiboken
Reviewer: Anderson Lizardo <anderson.lizardo@openbossa.org>
Reviewer: Bruno Araújo <bruno.araujo@openbossa.org>
Diffstat (limited to 'PySide/QtCore')
-rw-r--r-- | PySide/QtCore/glue/qcoreapplication_init.cpp | 7 | ||||
-rw-r--r-- | PySide/QtCore/qvariant_conversions.h | 2 | ||||
-rw-r--r-- | PySide/QtCore/typesystem_core.xml | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/PySide/QtCore/glue/qcoreapplication_init.cpp b/PySide/QtCore/glue/qcoreapplication_init.cpp index d290d6e7e..f53db030c 100644 --- a/PySide/QtCore/glue/qcoreapplication_init.cpp +++ b/PySide/QtCore/glue/qcoreapplication_init.cpp @@ -31,9 +31,12 @@ int SbkQCoreApplication_Init(PyObject* self, PyObject* args, PyObject*) return -1; } - SbkBaseWrapper_setCptr(self, new QCoreApplication(QCoreApplicationArgCount, QCoreApplicationArgValues)); + void* cptr = new QCoreApplication(QCoreApplicationArgCount, QCoreApplicationArgValues); + Shiboken::setCppPointer(reinterpret_cast<SbkBaseWrapper*>(self), + Shiboken::SbkType<QCoreApplication>(), + cptr); SbkBaseWrapper_setValidCppObject(self, 1); - Shiboken::BindingManager::instance().registerWrapper(reinterpret_cast<SbkBaseWrapper*>(self)); + Shiboken::BindingManager::instance().registerWrapper(reinterpret_cast<SbkBaseWrapper*>(self), cptr); Py_INCREF(self); Py_AtExit(DeleteQCoreApplicationAtExit); diff --git a/PySide/QtCore/qvariant_conversions.h b/PySide/QtCore/qvariant_conversions.h index fc3f96f5c..d6c23efd4 100644 --- a/PySide/QtCore/qvariant_conversions.h +++ b/PySide/QtCore/qvariant_conversions.h @@ -82,7 +82,7 @@ inline QVariant Converter<QVariant>::toCpp(PyObject* pyobj) } } else { // Is a known Qt type - return QVariant(typeCode, reinterpret_cast<SbkBaseWrapper*>(pyobj)->cptr); + return QVariant(typeCode, reinterpret_cast<SbkBaseWrapper*>(pyobj)->cptr[0]); } } diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml index 2a91dcbf4..67d48f79f 100644 --- a/PySide/QtCore/typesystem_core.xml +++ b/PySide/QtCore/typesystem_core.xml @@ -2786,7 +2786,7 @@ // The normal here would be to use the 'reference-count' tag but this // method is strongly tied to 'setTargetState' since both affect the same // internal value in QAbstractTransition. - Shiboken::SbkBaseWrapper_keepReference(reinterpret_cast<SbkBaseWrapper*>(%PYSELF), "setTargetState(QAbstractState*)1", %PYARG_1); + Shiboken::keepReference(reinterpret_cast<SbkBaseWrapper*>(%PYSELF), "setTargetState(QAbstractState*)1", %PYARG_1); </inject-code> </modify-function> |