forked from qt-creator/qt-creator
ProjectExplorer: Prevent redundant output on process crash
... in run controls. Fixes: QTCREATORBUG-26049 Change-Id: I51e560fb4674e2b8ac59cb1901d269d8179213d7 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -286,13 +286,13 @@ void ApplicationLauncherPrivate::localGuiProcessError()
|
|||||||
error = ApplicationLauncher::tr("Failed to start program. Path or permissions wrong?");
|
error = ApplicationLauncher::tr("Failed to start program. Path or permissions wrong?");
|
||||||
break;
|
break;
|
||||||
case QProcess::Crashed:
|
case QProcess::Crashed:
|
||||||
error = ApplicationLauncher::tr("The program has unexpectedly finished.");
|
|
||||||
status = QProcess::CrashExit;
|
status = QProcess::CrashExit;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
error = ApplicationLauncher::tr("Some error has occurred while running the program.");
|
error = ApplicationLauncher::tr("Some error has occurred while running the program.");
|
||||||
}
|
}
|
||||||
emit q->appendMessage(error, ErrorMessageFormat);
|
if (!error.isEmpty())
|
||||||
|
emit q->appendMessage(error, ErrorMessageFormat);
|
||||||
if (m_processRunning && !isRunning()) {
|
if (m_processRunning && !isRunning()) {
|
||||||
m_processRunning = false;
|
m_processRunning = false;
|
||||||
emit q->processExited(-1, status);
|
emit q->processExited(-1, status);
|
||||||
|
|||||||
@@ -1233,8 +1233,11 @@ void SimpleTargetRunner::doStart(const Runnable &runnable, const IDevice::ConstP
|
|||||||
this, [this, runnable](QProcess::ProcessError error) {
|
this, [this, runnable](QProcess::ProcessError error) {
|
||||||
if (error == QProcess::Timedout)
|
if (error == QProcess::Timedout)
|
||||||
return; // No actual change on the process side.
|
return; // No actual change on the process side.
|
||||||
const QString msg = userMessageForProcessError(error, runnable.command.executable());
|
if (error != QProcess::Crashed) {
|
||||||
appendMessage(msg, Utils::NormalMessageFormat);
|
const QString msg = userMessageForProcessError(
|
||||||
|
error, runnable.command.executable());
|
||||||
|
appendMessage(msg, Utils::NormalMessageFormat);
|
||||||
|
}
|
||||||
if (!m_stopReported) {
|
if (!m_stopReported) {
|
||||||
m_stopReported = true;
|
m_stopReported = true;
|
||||||
reportStopped();
|
reportStopped();
|
||||||
|
|||||||
Reference in New Issue
Block a user