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:
Jarek Kobus
2022-04-05 18:10:59 +02:00
parent 6d50a5e36e
commit cd06f69cc9

View File

@@ -388,15 +388,11 @@ UvscServerProviderRunner::UvscServerProviderRunner(ProjectExplorer::RunControl *
reportStarted();
});
connect(&m_process, &QtcProcess::finished, this, [this] {
appendMessage(m_process.exitMessage(), NormalMessageFormat);
reportStopped();
});
connect(&m_process, &QtcProcess::errorOccurred, this, [this] (QProcess::ProcessError error) {
if (error == QProcess::Timedout)
return; // No actual change on the process side.
const QString msg = userMessageForProcessError(
error, m_process.commandLine().executable());
appendMessage(msg, Utils::NormalMessageFormat);
const QProcess::ProcessError error = m_process.error();
const QString message = (error == QProcess::UnknownError)
? m_process.exitMessage()
: userMessageForProcessError(error, m_process.commandLine().executable());
appendMessage(message, Utils::NormalMessageFormat);
reportStopped();
});
}