diff options
Diffstat (limited to 'sources/pyside2/PySide2/QtCore/typesystem_core_common.xml')
-rw-r--r-- | sources/pyside2/PySide2/QtCore/typesystem_core_common.xml | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml index 03991af38..41a20a617 100644 --- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml +++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml @@ -3215,7 +3215,7 @@ </inject-documentation> <add-function signature="QCoreApplication(QStringList)"> <inject-code> - QCoreApplication_constructor(%PYSELF, args, &%0); + QCoreApplicationConstructor(%PYSELF, args, &%0); </inject-code> </add-function> <!-- blocking functions --> @@ -3226,23 +3226,24 @@ <modify-function signature="sendPostedEvents(QObject*, int)" allow-thread="yes"/> <modify-function signature="instance()"> <inject-code class="target"> - QCoreApplication* app = QCoreApplication::instance(); - PyObject* pyApp = Py_None; + QCoreApplication *app = QCoreApplication::instance(); + PyObject *pyApp = Py_None; if (app) { - pyApp = reinterpret_cast<PyObject*>(Shiboken::BindingManager::instance().retrieveWrapper(app)); + pyApp = reinterpret_cast<PyObject*>( + Shiboken::BindingManager::instance().retrieveWrapper(app)); if (!pyApp) - pyApp = %CONVERTTOPYTHON[QCoreApplication*](app); // this will keep app live after python exit (extra ref) + pyApp = %CONVERTTOPYTHON[QCoreApplication*](app); + // this will keep app live after python exit (extra ref) } + // PYSIDE-571: make sure that we return the singleton "None" + if (pyApp == Py_None) + Py_DECREF(MakeSingletonQAppWrapper(0)); // here qApp and instance() diverge %PYARG_0 = pyApp; Py_XINCREF(%PYARG_0); </inject-code> </modify-function> <modify-function signature="exec()" rename="exec_" allow-thread="yes"/> - <!-- ### Obsolete - <modify-function signature="argc()" remove="all"/> - <modify-function signature="argv()" remove="all"/> - --> <modify-function signature="notify(QObject*,QEvent*)" allow-thread="yes"> <modify-argument index="2" invalidate-after-use="yes"/> </modify-function> |