aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtCore
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-12-06 19:53:07 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:56:17 -0300
commite3814f27dd3975b5be5a2f328353fe7d144ce23b (patch)
treec8324443dd195d2ba86f2fc5e4dc71ad13d368c4 /PySide/QtCore
parent2f70b1047116fa262b30562f325dfaefff3daa0d (diff)
Replace private.py file by an inject code.
Diffstat (limited to 'PySide/QtCore')
-rw-r--r--PySide/QtCore/typesystem_core.xml11
1 files changed, 11 insertions, 0 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index 5af8fe538..9ac07f6fe 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -401,6 +401,17 @@
</inject-code>
<inject-code class="target" position="end" file="glue/qt_version.cpp" />
+ <inject-code class="target" position="end">
+ { // Avoid name clash
+ Shiboken::AutoDecRef atexit(Shiboken::Module::import("atexit"));
+ Shiboken::AutoDecRef regFunc(PyObject_GetAttrString(atexit, "register"));
+ Shiboken::AutoDecRef shutDownFunc(PyObject_GetAttrString(module, "__moduleShutdown"));
+ Shiboken::AutoDecRef args(PyTuple_New(1));
+ PyTuple_SET_ITEM(args, 0, shutDownFunc);
+ Shiboken::AutoDecRef retval(PyObject_Call(regFunc, args, 0));
+ Q_ASSERT(!retval.isNull());
+ }
+ </inject-code>
<add-function signature="__moduleShutdown()">
<inject-code class="target" position="beginning">