Use QProcess' / process lanuncher's exit code

Change-Id: I802116c45847daf9a647771ee293aef8463fc3c7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Jarek Kobus
2021-09-02 16:38:40 +02:00
parent 597750507e
commit a454b3dc23
4 changed files with 18 additions and 5 deletions

View File

@@ -218,6 +218,8 @@ void CallerHandle::handleError(const ErrorSignal *launcherSignal)
m_processState = QProcess::NotRunning;
m_error = launcherSignal->error();
m_errorString = launcherSignal->errorString();
if (m_error == QProcess::FailedToStart)
m_exitCode = 255; // This code is being returned by QProcess when FailedToStart error occurred
emit errorOccurred(m_error);
}
@@ -328,6 +330,12 @@ qint64 CallerHandle::processId() const
return m_processId;
}
int CallerHandle::exitCode() const
{
QTC_ASSERT(isCalledFromCallersThread(), return -1);
return m_exitCode;
}
QString CallerHandle::errorString() const
{
QTC_ASSERT(isCalledFromCallersThread(), return {});