diff options
Diffstat (limited to 'src/corelib/io/qprocess.cpp')
-rw-r--r-- | src/corelib/io/qprocess.cpp | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 7f4d7f0313..fb86b053e9 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -854,8 +854,7 @@ void QProcessPrivate::cleanup() pid = 0; } if (processFinishedNotifier) { - processFinishedNotifier->setEnabled(false); - qDeleteInEventHandler(processFinishedNotifier); + delete processFinishedNotifier; processFinishedNotifier = 0; } @@ -865,33 +864,28 @@ void QProcessPrivate::cleanup() dying = false; if (stdoutChannel.notifier) { - stdoutChannel.notifier->setEnabled(false); - qDeleteInEventHandler(stdoutChannel.notifier); + delete stdoutChannel.notifier; stdoutChannel.notifier = 0; } if (stderrChannel.notifier) { - stderrChannel.notifier->setEnabled(false); - qDeleteInEventHandler(stderrChannel.notifier); + delete stderrChannel.notifier; stderrChannel.notifier = 0; } if (stdinChannel.notifier) { - stdinChannel.notifier->setEnabled(false); - qDeleteInEventHandler(stdinChannel.notifier); + delete stdinChannel.notifier; stdinChannel.notifier = 0; } if (startupSocketNotifier) { - startupSocketNotifier->setEnabled(false); - qDeleteInEventHandler(startupSocketNotifier); + delete startupSocketNotifier; startupSocketNotifier = 0; } if (deathNotifier) { - deathNotifier->setEnabled(false); - qDeleteInEventHandler(deathNotifier); + delete deathNotifier; deathNotifier = 0; } #ifdef Q_OS_WIN if (notifier) { - qDeleteInEventHandler(notifier); + delete notifier; notifier = 0; } #endif @@ -1161,12 +1155,8 @@ void QProcessPrivate::closeWriteChannel() qDebug("QProcessPrivate::closeWriteChannel()"); #endif if (stdinChannel.notifier) { - extern void qDeleteInEventHandler(QObject *o); - stdinChannel.notifier->setEnabled(false); - if (stdinChannel.notifier) { - qDeleteInEventHandler(stdinChannel.notifier); - stdinChannel.notifier = 0; - } + delete stdinChannel.notifier; + stdinChannel.notifier = 0; } #ifdef Q_OS_WIN // ### Find a better fix, feeding the process little by little |