forked from qt-creator/qt-creator
Use QProcess' / process lanuncher's exit code
Change-Id: I802116c45847daf9a647771ee293aef8463fc3c7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -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 {});
|
||||
|
||||
Reference in New Issue
Block a user