aboutsummaryrefslogtreecommitdiffstats
path: root/PySide
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-09-24 15:58:00 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-09-24 16:44:45 -0300
commit6320bfa4fa3428d05785edc433ff9740799c938f (patch)
tree54986cc80485824ed7f4300fde5ad629f74d8eef /PySide
parent2bd1bab4bb37b44e5ffc94e284e67d7cfe4ce9ff (diff)
Fixed QCoreApplication and QApplication cleanup.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'PySide')
-rw-r--r--PySide/QtCore/glue/qcoreapplication_init.cpp3
-rw-r--r--PySide/QtGui/glue/qapplication_init.cpp7
2 files changed, 3 insertions, 7 deletions
diff --git a/PySide/QtCore/glue/qcoreapplication_init.cpp b/PySide/QtCore/glue/qcoreapplication_init.cpp
index 14ccbb8f9..461757cc3 100644
--- a/PySide/QtCore/glue/qcoreapplication_init.cpp
+++ b/PySide/QtCore/glue/qcoreapplication_init.cpp
@@ -10,10 +10,9 @@ void DeleteQCoreApplicationAtExit()
QCoreApplication *cpp = QCoreApplication::instance();
if (cpp) {
Shiboken::BindingManager &bmngr = Shiboken::BindingManager::instance();
- PyObject* pySelf = bmngr.retrieveWrapper(cpp);
cpp->flush();
QCoreApplication::processEvents();
- bmngr.invalidateWrapper(pySelf);
+ bmngr.destroyWrapper(cpp);
delete cpp;
}
}
diff --git a/PySide/QtGui/glue/qapplication_init.cpp b/PySide/QtGui/glue/qapplication_init.cpp
index 208d59a52..246e5d1ab 100644
--- a/PySide/QtGui/glue/qapplication_init.cpp
+++ b/PySide/QtGui/glue/qapplication_init.cpp
@@ -15,18 +15,15 @@ void DeleteQApplicationAtExit()
// Delete all widgets, this is slow but is necessary to avoid problems with python object
foreach(QWidget* w, QApplication::allWidgets()) {
- PyObject* pySelf = bmngr.retrieveWrapper(w);
-
w->deleteLater();
//Make sure all events will send before invalidated the python object
QApplication::processEvents();
- bmngr.invalidateWrapper(pySelf);
+ bmngr.destroyWrapper(w);
}
- PyObject* pySelf = bmngr.retrieveWrapper(cpp);
cpp->deleteLater();
QApplication::processEvents();
- bmngr.invalidateWrapper(pySelf);
+ bmngr.destroyWrapper(cpp);
}
}