ProjectExplorer: Fix some wrong output message types

OutputFormat::Stderr is for output from external tools, not our own
messages.

Fixes: QTCREATORBUG-31544
Change-Id: I1065823fe8188d4368dc750333f7a744df85aa5f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2024-09-17 16:04:38 +02:00
parent 2eb97663c7
commit e772fbab6b
2 changed files with 11 additions and 8 deletions

View File

@@ -814,16 +814,19 @@ void BuildManager::startBuildQueue()
return;
const QString projectName = buildStep->project()->displayName();
const QString targetName = target->displayName();
addToOutputWindow(Tr::tr("Error while building/deploying project %1 (kit: %2)")
.arg(projectName, targetName), BuildStep::OutputFormat::Stderr);
addToOutputWindow(
Tr::tr("Error while building/deploying project %1 (kit: %2)")
.arg(projectName, targetName),
BuildStep::OutputFormat::ErrorMessage);
const Tasks kitTasks = target->kit()->validate();
if (!kitTasks.isEmpty()) {
addToOutputWindow(Tr::tr("The kit %1 has configuration issues which might "
"be the root cause for this problem.")
.arg(targetName), BuildStep::OutputFormat::Stderr);
.arg(targetName), BuildStep::OutputFormat::ErrorMessage);
}
addToOutputWindow(Tr::tr("When executing step \"%1\"")
.arg(buildStep->displayName()), BuildStep::OutputFormat::Stderr);
addToOutputWindow(
Tr::tr("When executing step \"%1\"").arg(buildStep->displayName()),
BuildStep::OutputFormat::ErrorMessage);
};
const Group recipeGroup {
onGroupSetup(onRecipeSetup),
@@ -919,9 +922,9 @@ bool BuildManager::buildQueueAppend(const QList<BuildItem> &items, const QString
const QString projectName = buildStep->project()->displayName();
const QString targetName = buildStep->target()->displayName();
addToOutputWindow(Tr::tr("Error while building/deploying project %1 (kit: %2)")
.arg(projectName, targetName), BuildStep::OutputFormat::Stderr);
.arg(projectName, targetName), BuildStep::OutputFormat::ErrorMessage);
addToOutputWindow(Tr::tr("When executing step \"%1\"")
.arg(buildStep->displayName()), BuildStep::OutputFormat::Stderr);
.arg(buildStep->displayName()), BuildStep::OutputFormat::ErrorMessage);
for (BuildStep *buildStep : std::as_const(connectedSteps))
disconnect(buildStep, nullptr, m_instance, nullptr);
d->m_outputWindow->popup(IOutputPane::NoModeSwitch);

View File

@@ -191,7 +191,7 @@ QVariant TarPackageCreationStep::data(Id id) const
void TarPackageCreationStep::raiseError(const QString &errorMessage)
{
emit addTask(DeploymentTask(Task::Error, errorMessage));
emit addOutput(errorMessage, OutputFormat::Stderr);
emit addOutput(errorMessage, OutputFormat::ErrorMessage);
}
void TarPackageCreationStep::raiseWarning(const QString &warningMessage)