aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-19 08:12:33 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-19 08:12:33 +0200
commitd8bd1449361835a3fe67f8ad33e82cec78940f1c (patch)
tree279e019b83fb2aa9e0673d00b5df4c432315ea51 /sources/pyside2/PySide2
parentb4098737b13c91ca85b69362426f0f30768c49b1 (diff)
parent7dba09d7c4007e96fb0a39bf6f6e740cd207324a (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'sources/pyside2/PySide2')
-rw-r--r--sources/pyside2/PySide2/glue/qtcore.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/sources/pyside2/PySide2/glue/qtcore.cpp b/sources/pyside2/PySide2/glue/qtcore.cpp
index fde016548..9db4e2e82 100644
--- a/sources/pyside2/PySide2/glue/qtcore.cpp
+++ b/sources/pyside2/PySide2/glue/qtcore.cpp
@@ -1211,8 +1211,8 @@ QByteArray ba(1 + int(%2), char(0));
// @snippet qcryptographichash-adddata
// @snippet qsocketnotifier
-Shiboken::AutoDecRef socket(%PYARG_1);
-if (!socket.isNull()) {
+PyObject *socket = %PYARG_1;
+if (socket != nullptr) {
// We use qintptr as PyLong, but we check for int
// since it is currently an alias to be Python2 compatible.
// Internally, ints are qlonglongs.
@@ -1340,18 +1340,17 @@ if (!PyTuple_SetItem(empty, 0, PyList_New(0))) {
// @snippet qcoreapplication-2
// @snippet qcoreapplication-instance
-QCoreApplication *app = QCoreApplication::instance();
PyObject *pyApp = Py_None;
-if (app) {
+if (qApp) {
pyApp = reinterpret_cast<PyObject*>(
- Shiboken::BindingManager::instance().retrieveWrapper(app));
+ Shiboken::BindingManager::instance().retrieveWrapper(qApp));
if (!pyApp)
- pyApp = %CONVERTTOPYTHON[QCoreApplication*](app);
+ pyApp = %CONVERTTOPYTHON[QCoreApplication*](qApp);
// 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
+ Py_DECREF(MakeSingletonQAppWrapper(nullptr)); // here qApp and instance() diverge
%PYARG_0 = pyApp;
Py_XINCREF(%PYARG_0);
// @snippet qcoreapplication-instance