From f9896cb3cdb884fbd98b0c60f55133b2e6c581d3 Mon Sep 17 00:00:00 2001 From: Alex Trotsenko Date: Thu, 28 Jan 2021 20:47:50 +0200 Subject: [PATCH] QProcess/Unix: remove dead function findExitCode() doesn't do anything on Unix. Change-Id: I3efdc1380a39437c4c029073f3b10ccf7a65e580 Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira --- src/corelib/io/qprocess.cpp | 7 ++----- src/corelib/io/qprocess_p.h | 3 ++- src/corelib/io/qprocess_unix.cpp | 4 ---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 8b26e845a8..2462d829a0 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -1152,8 +1152,9 @@ void QProcessPrivate::processFinished() #ifdef Q_OS_UNIX waitForDeadChild(); -#endif +#else findExitCode(); +#endif cleanup(); @@ -1196,7 +1197,6 @@ bool QProcessPrivate::_q_startupNotification() setErrorAndEmit(QProcess::FailedToStart, errorMessage); #ifdef Q_OS_UNIX waitForDeadChild(); - findExitCode(); #endif cleanup(); return false; @@ -1245,9 +1245,6 @@ QProcess::~QProcess() kill(); waitForFinished(); } -#ifdef Q_OS_UNIX - d->findExitCode(); -#endif d->cleanup(); } diff --git a/src/corelib/io/qprocess_p.h b/src/corelib/io/qprocess_p.h index 4364d99c9b..7b58b32369 100644 --- a/src/corelib/io/qprocess_p.h +++ b/src/corelib/io/qprocess_p.h @@ -356,9 +356,10 @@ public: void processFinished(); void terminateProcess(); void killProcess(); - void findExitCode(); #ifdef Q_OS_UNIX void waitForDeadChild(); +#else + void findExitCode(); #endif #ifdef Q_OS_WIN STARTUPINFOW createStartupInfo(); diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index 712fe2a5d9..5628456796 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -853,10 +853,6 @@ bool QProcessPrivate::waitForFinished(const QDeadlineTimer &deadline) return false; } -void QProcessPrivate::findExitCode() -{ -} - void QProcessPrivate::waitForDeadChild() { Q_ASSERT(forkfd != -1);