diff options
Diffstat (limited to 'src/corelib/io/qprocess.cpp')
-rw-r--r-- | src/corelib/io/qprocess.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 7b2de02d1d..9557a1d24b 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -814,6 +814,7 @@ void QProcessPrivate::Channel::clear() \a newState argument is the state QProcess changed to. */ +#if QT_DEPRECATED_SINCE(5, 13) /*! \fn void QProcess::finished(int exitCode) \obsolete @@ -821,6 +822,7 @@ void QProcessPrivate::Channel::clear() Use finished(int exitCode, QProcess::ExitStatus status) instead. */ +#endif /*! \fn void QProcess::finished(int exitCode, QProcess::ExitStatus exitStatus) @@ -996,7 +998,12 @@ void QProcessPrivate::setErrorAndEmit(QProcess::ProcessError error, const QStrin Q_ASSERT(error != QProcess::UnknownError); setError(error, description); emit q->errorOccurred(processError); +#if QT_DEPRECATED_SINCE(5, 6) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED emit q->error(processError); +QT_WARNING_POP +#endif } /*! @@ -1173,7 +1180,12 @@ bool QProcessPrivate::_q_processDied() //emit q->standardOutputClosed(); //emit q->standardErrorClosed(); +#if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED emit q->finished(exitCode); +QT_WARNING_POP +#endif emit q->finished(exitCode, exitStatus); } #if defined QPROCESS_DEBUG @@ -1265,6 +1277,7 @@ QProcess::~QProcess() d->cleanup(); } +#if QT_DEPRECATED_SINCE(5, 13) /*! \obsolete Returns the read channel mode of the QProcess. This function is @@ -1288,6 +1301,7 @@ void QProcess::setReadChannelMode(ProcessChannelMode mode) { setProcessChannelMode(mode); } +#endif /*! \since 4.2 @@ -2474,7 +2488,7 @@ QProcess::ExitStatus QProcess::exitStatus() const int QProcess::execute(const QString &program, const QStringList &arguments) { QProcess process; - process.setReadChannelMode(ForwardedChannels); + process.setProcessChannelMode(ForwardedChannels); process.start(program, arguments); if (!process.waitForFinished(-1) || process.error() == FailedToStart) return -2; @@ -2497,7 +2511,7 @@ int QProcess::execute(const QString &program, const QStringList &arguments) int QProcess::execute(const QString &command) { QProcess process; - process.setReadChannelMode(ForwardedChannels); + process.setProcessChannelMode(ForwardedChannels); process.start(command); if (!process.waitForFinished(-1) || process.error() == FailedToStart) return -2; |