2
2
static int QCoreApplicationArgCount;
3
3
static char** QCoreApplicationArgValues;
6
* Called at QtCore module exit
8
void DeleteQCoreApplicationAtExit()
10
QCoreApplication *cpp = QCoreApplication::instance();
12
Shiboken::BindingManager &bmngr = Shiboken::BindingManager::instance();
14
QCoreApplication::processEvents();
15
bmngr.destroyWrapper(cpp);
20
int SbkQCoreApplication_Init(PyObject* self, PyObject* args, PyObject*)
22
if (Shiboken::isUserType(self) && !Shiboken::canCallConstructor(self->ob_type, Shiboken::SbkType<QApplication >()))
5
int Sbk_QCoreApplication_Init(PyObject* self, PyObject* args, PyObject*)
7
if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType<QCoreApplication >()))
37
if (!PySequenceToArgcArgv(PyTuple_GET_ITEM(args, 0), &QCoreApplicationArgCount, &QCoreApplicationArgValues, "PySideApp")) {
22
if (!Shiboken::sequenceToArgcArgv(PyTuple_GET_ITEM(args, 0), &QCoreApplicationArgCount, &QCoreApplicationArgValues, "PySideApp")) {
38
23
PyErr_BadArgument();
27
SbkObject* sbkSelf = reinterpret_cast<SbkObject*>(self);
42
28
QCoreApplicationWrapper* cptr = new QCoreApplicationWrapper(QCoreApplicationArgCount, QCoreApplicationArgValues);
43
Shiboken::setCppPointer(reinterpret_cast<SbkBaseWrapper*>(self),
44
Shiboken::SbkType<QCoreApplication>(),
47
SbkBaseWrapper_setValidCppObject(self, 1);
48
SbkBaseWrapper *sbkSelf = reinterpret_cast<SbkBaseWrapper*>(self);
49
sbkSelf->containsCppWrapper = 1;
50
sbkSelf->hasOwnership = 0;
29
Shiboken::Object::setCppPointer(sbkSelf,
30
Shiboken::SbkType<QCoreApplication>(),
33
Shiboken::Object::setValidCpp(sbkSelf, true);
34
Shiboken::Object::setHasCppWrapper(sbkSelf, true);
35
Shiboken::Object::releaseOwnership(sbkSelf);
51
37
Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);
52
PySide::signalUpdateSource(self);
38
PySide::Signal::updateSourceObject(self);
53
39
cptr->metaObject();
55
PySide::registerCleanupFunction(DeleteQCoreApplicationAtExit);
41
PySide::registerCleanupFunction(&PySide::destroyQCoreApplication);