summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2021-01-28 20:47:50 +0200
committerAlex Trotsenko <alex1973tr@gmail.com>2021-01-29 12:55:42 +0200
commitf9896cb3cdb884fbd98b0c60f55133b2e6c581d3 (patch)
treed280ff369ca88f80ba9ce5ce11f5fb7c2c214da5
parentf2c3b52c6c513ebba9dc0db69efe8bdbf6be8334 (diff)
QProcess/Unix: remove dead function
findExitCode() doesn't do anything on Unix. Change-Id: I3efdc1380a39437c4c029073f3b10ccf7a65e580 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/corelib/io/qprocess.cpp7
-rw-r--r--src/corelib/io/qprocess_p.h3
-rw-r--r--src/corelib/io/qprocess_unix.cpp4
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);