forked from qt-creator/qt-creator
UvscServerProviderRunner: Connect to QtcProcess::done() signal
Instead of connecting to errorOccurred() and finished() signals. Change-Id: I3c90e6d6166f0abcaadc5140439208058fbc75cd Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -388,15 +388,11 @@ UvscServerProviderRunner::UvscServerProviderRunner(ProjectExplorer::RunControl *
|
|||||||
reportStarted();
|
reportStarted();
|
||||||
});
|
});
|
||||||
connect(&m_process, &QtcProcess::finished, this, [this] {
|
connect(&m_process, &QtcProcess::finished, this, [this] {
|
||||||
appendMessage(m_process.exitMessage(), NormalMessageFormat);
|
const QProcess::ProcessError error = m_process.error();
|
||||||
reportStopped();
|
const QString message = (error == QProcess::UnknownError)
|
||||||
});
|
? m_process.exitMessage()
|
||||||
connect(&m_process, &QtcProcess::errorOccurred, this, [this] (QProcess::ProcessError error) {
|
: userMessageForProcessError(error, m_process.commandLine().executable());
|
||||||
if (error == QProcess::Timedout)
|
appendMessage(message, Utils::NormalMessageFormat);
|
||||||
return; // No actual change on the process side.
|
|
||||||
const QString msg = userMessageForProcessError(
|
|
||||||
error, m_process.commandLine().executable());
|
|
||||||
appendMessage(msg, Utils::NormalMessageFormat);
|
|
||||||
reportStopped();
|
reportStopped();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user