From c5f7f5ab0aab672180714cb172818aa3cd394c90 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 13 Jan 2023 12:38:22 +0100 Subject: ProjectExplorer: Tr::tr Change-Id: I8f1b463c5cc7a53627f7a9ad261998b92f13e56a Reviewed-by: Alessandro Portale --- src/plugins/projectexplorer/abstractprocessstep.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/plugins/projectexplorer/abstractprocessstep.cpp') diff --git a/src/plugins/projectexplorer/abstractprocessstep.cpp b/src/plugins/projectexplorer/abstractprocessstep.cpp index ddae1e083f..08d58117c6 100644 --- a/src/plugins/projectexplorer/abstractprocessstep.cpp +++ b/src/plugins/projectexplorer/abstractprocessstep.cpp @@ -2,11 +2,13 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #include "abstractprocessstep.h" + #include "buildconfiguration.h" #include "buildstep.h" #include "processparameters.h" #include "projectexplorer.h" #include "projectexplorersettings.h" +#include "projectexplorertr.h" #include #include @@ -101,7 +103,7 @@ AbstractProcessStep::~AbstractProcessStep() void AbstractProcessStep::emitFaultyConfigurationMessage() { - emit addOutput(tr("Configuration is faulty. Check the Issues view for details."), + emit addOutput(Tr::tr("Configuration is faulty. Check the Issues view for details."), OutputFormat::NormalMessage); } @@ -191,7 +193,7 @@ bool AbstractProcessStep::checkWorkingDirectory() const FilePath wd = d->m_param.effectiveWorkingDirectory(); if (!wd.exists()) { if (!wd.createDir()) { - emit addOutput(tr("Could not create directory \"%1\"").arg(wd.toUserOutput()), + emit addOutput(Tr::tr("Could not create directory \"%1\"").arg(wd.toUserOutput()), OutputFormat::ErrorMessage); finish(ProcessResult::StartFailed); return false; @@ -232,7 +234,7 @@ void AbstractProcessStep::setupProcess(QtcProcess *process) }); connect(process, &QtcProcess::started, this, [this] { ProcessParameters *params = displayedParameters(); - emit addOutput(tr("Starting: \"%1\" %2") + emit addOutput(Tr::tr("Starting: \"%1\" %2") .arg(params->effectiveCommand().toUserOutput(), params->prettyArguments()), OutputFormat::NormalMessage); }); @@ -269,7 +271,7 @@ void AbstractProcessStep::doCancel() } if (d->m_taskTree) { d->m_taskTree.reset(); - emit addOutput(tr("The build step was ended forcefully."), OutputFormat::ErrorMessage); + emit addOutput(Tr::tr("The build step was ended forcefully."), OutputFormat::ErrorMessage); emit finished(false); } } @@ -323,14 +325,14 @@ void AbstractProcessStep::Private::cleanUp(int exitCode, QProcess::ExitStatus st { const QString command = q->displayedParameters()->effectiveCommand().toUserOutput(); if (status == QProcess::NormalExit && exitCode == 0) { - emit q->addOutput(tr("The process \"%1\" exited normally.").arg(command), + emit q->addOutput(Tr::tr("The process \"%1\" exited normally.").arg(command), OutputFormat::NormalMessage); } else if (status == QProcess::NormalExit) { - emit q->addOutput(tr("The process \"%1\" exited with code %2.") + emit q->addOutput(Tr::tr("The process \"%1\" exited with code %2.") .arg(command, QString::number(exitCode)), OutputFormat::ErrorMessage); } else { - emit q->addOutput(tr("The process \"%1\" crashed.").arg(command), + emit q->addOutput(Tr::tr("The process \"%1\" crashed.").arg(command), OutputFormat::ErrorMessage); } @@ -351,7 +353,7 @@ void AbstractProcessStep::Private::cleanUp(int exitCode, QProcess::ExitStatus st void AbstractProcessStep::processStartupFailed() { ProcessParameters *params = displayedParameters(); - emit addOutput(tr("Could not start process \"%1\" %2.") + emit addOutput(Tr::tr("Could not start process \"%1\" %2.") .arg(params->effectiveCommand().toUserOutput(), params->prettyArguments()), OutputFormat::ErrorMessage); -- cgit v1.2.3