Changes needed to compile QtCore with libshiboken v1.0

This commit is contained in:
Hugo Parente Lima 2010-11-10 17:22:32 -02:00
commit 92dcb7ae3a
13 changed files with 57 additions and 59 deletions

View file

@ -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*>()));
}
}
}