forked from qt-creator/qt-creator
BareMetal: Use upcoming-standard process exit message
Change-Id: Id90b01eaa3afcf768ae07821c435b1db1680d3cb Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -91,12 +91,12 @@ UvscServerProvider::UvscServerProvider(const UvscServerProvider &other)
|
|||||||
setEngineType(UvscEngineType);
|
setEngineType(UvscEngineType);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UvscServerProvider::setToolsIniFile(const Utils::FilePath &toolsIniFile)
|
void UvscServerProvider::setToolsIniFile(const FilePath &toolsIniFile)
|
||||||
{
|
{
|
||||||
m_toolsIniFile = toolsIniFile;
|
m_toolsIniFile = toolsIniFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::FilePath UvscServerProvider::toolsIniFile() const
|
FilePath UvscServerProvider::toolsIniFile() const
|
||||||
{
|
{
|
||||||
return m_toolsIniFile;
|
return m_toolsIniFile;
|
||||||
}
|
}
|
||||||
@@ -251,8 +251,7 @@ bool UvscServerProvider::fromMap(const QVariantMap &data)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::FilePath UvscServerProvider::projectFilePath(DebuggerRunTool *runTool,
|
FilePath UvscServerProvider::projectFilePath(DebuggerRunTool *runTool, QString &errorMessage) const
|
||||||
QString &errorMessage) const
|
|
||||||
{
|
{
|
||||||
const FilePath projectPath = buildProjectFilePath(runTool);
|
const FilePath projectPath = buildProjectFilePath(runTool);
|
||||||
std::ofstream ofs(projectPath.toString().toStdString(), std::ofstream::out);
|
std::ofstream ofs(projectPath.toString().toStdString(), std::ofstream::out);
|
||||||
@@ -332,12 +331,12 @@ void UvscServerProviderConfigWidget::discard()
|
|||||||
IDebugServerProviderConfigWidget::discard();
|
IDebugServerProviderConfigWidget::discard();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UvscServerProviderConfigWidget::setToolsIniFile(const Utils::FilePath &toolsIniFile)
|
void UvscServerProviderConfigWidget::setToolsIniFile(const FilePath &toolsIniFile)
|
||||||
{
|
{
|
||||||
m_toolsIniChooser->setFilePath(toolsIniFile);
|
m_toolsIniChooser->setFilePath(toolsIniFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::FilePath UvscServerProviderConfigWidget::toolsIniFile() const
|
FilePath UvscServerProviderConfigWidget::toolsIniFile() const
|
||||||
{
|
{
|
||||||
return m_toolsIniChooser->filePath();
|
return m_toolsIniChooser->filePath();
|
||||||
}
|
}
|
||||||
@@ -386,21 +385,16 @@ UvscServerProviderRunner::UvscServerProviderRunner(ProjectExplorer::RunControl *
|
|||||||
this->runControl()->setApplicationProcessHandle(pid);
|
this->runControl()->setApplicationProcessHandle(pid);
|
||||||
reportStarted();
|
reportStarted();
|
||||||
});
|
});
|
||||||
connect(&m_process, &QtcProcess::finished, this, [this] {
|
connect(&m_process, &QtcProcess::done, this, [this] {
|
||||||
const QProcess::ProcessError error = m_process.error();
|
appendMessage(m_process.exitMessage(), NormalMessageFormat);
|
||||||
const QString message = (error == QProcess::UnknownError)
|
|
||||||
? m_process.exitMessage()
|
|
||||||
: userMessageForProcessError(error, m_process.commandLine().executable());
|
|
||||||
appendMessage(message, Utils::NormalMessageFormat);
|
|
||||||
reportStopped();
|
reportStopped();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void UvscServerProviderRunner::start()
|
void UvscServerProviderRunner::start()
|
||||||
{
|
{
|
||||||
const QString msg = RunControl::tr("Starting %1 ...")
|
const QString msg = RunControl::tr("Starting %1 ...").arg(m_process.commandLine().displayName());
|
||||||
.arg(m_process.commandLine().toUserOutput());
|
appendMessage(msg, NormalMessageFormat);
|
||||||
appendMessage(msg, Utils::NormalMessageFormat);
|
|
||||||
|
|
||||||
m_process.start();
|
m_process.start();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user