aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtCore/glue/qcoreapplication_init.cpp
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-10-22 17:28:43 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-10-22 19:16:51 -0200
commit77a1654ad587241d3c14bafa2c0deae53e1599ee (patch)
tree1b2dece9fe99a5a956420e03229d0872916a9a05 /PySide/QtCore/glue/qcoreapplication_init.cpp
parent800fb4613cb61dbff33750ec0ab4b18ca3369c6c (diff)
Fix bugs 430, 426, 429, 394, 433.
These bugs are about QApplication instance being destroyed before some QObject. Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'PySide/QtCore/glue/qcoreapplication_init.cpp')
-rw-r--r--PySide/QtCore/glue/qcoreapplication_init.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/PySide/QtCore/glue/qcoreapplication_init.cpp b/PySide/QtCore/glue/qcoreapplication_init.cpp
index 461757cc3..66247bfc8 100644
--- a/PySide/QtCore/glue/qcoreapplication_init.cpp
+++ b/PySide/QtCore/glue/qcoreapplication_init.cpp
@@ -2,21 +2,6 @@
static int QCoreApplicationArgCount;
static char** QCoreApplicationArgValues;
-/**
- * Called at QtCore module exit
- */
-void DeleteQCoreApplicationAtExit()
-{
- QCoreApplication *cpp = QCoreApplication::instance();
- if (cpp) {
- Shiboken::BindingManager &bmngr = Shiboken::BindingManager::instance();
- cpp->flush();
- QCoreApplication::processEvents();
- bmngr.destroyWrapper(cpp);
- delete cpp;
- }
-}
-
int SbkQCoreApplication_Init(PyObject* self, PyObject* args, PyObject*)
{
if (Shiboken::isUserType(self) && !Shiboken::canCallConstructor(self->ob_type, Shiboken::SbkType<QApplication >()))
@@ -52,7 +37,7 @@ int SbkQCoreApplication_Init(PyObject* self, PyObject* args, PyObject*)
PySide::signalUpdateSource(self);
cptr->metaObject();
- PySide::registerCleanupFunction(DeleteQCoreApplicationAtExit);
+ PySide::registerCleanupFunction(&PySide::destroyQCoreApplication);
Py_INCREF(self);
return 1;
}