ProjectExplorer: Always print process exit code on normal exit

... in SimpleTargetRunner.

Fixes: QTCREATORBUG-31141
Change-Id: Iede5d88c11312152f771d3008bb1cd6d471cfaf3
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2024-09-02 14:19:47 +02:00
parent 3817b7cf27
commit 7b08a81316

View File

@@ -1477,12 +1477,14 @@ void SimpleTargetRunnerPrivate::forwardDone()
m_waitForDoneTimer.stop();
const QString executable = m_command.executable().displayName();
QString msg = Tr::tr("%1 exited with code %2").arg(executable).arg(m_resultData.m_exitCode);
if (m_resultData.m_exitStatus == QProcess::CrashExit)
msg = Tr::tr("%1 crashed.").arg(executable);
else if (m_stopForced)
msg = Tr::tr("The process was ended forcefully.");
else if (m_resultData.m_error != QProcess::UnknownError)
if (m_resultData.m_exitStatus == QProcess::CrashExit) {
if (m_stopForced)
msg = Tr::tr("The process was ended forcefully.");
else
msg = Tr::tr("The process crashed.");
} else if (m_resultData.m_error != QProcess::UnknownError) {
msg = RunWorker::userMessageForProcessError(m_resultData.m_error, m_command.executable());
}
q->appendMessage(msg, NormalMessageFormat);
m_stopReported = true;
q->reportStopped();