forked from qt-creator/qt-creator
iOS: Tr::tr
Change-Id: I547af218546927622414999e5b9019ab62916e7e Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "iosbuildstep.h"
|
||||
|
||||
#include "iosconstants.h"
|
||||
#include "iostr.h"
|
||||
|
||||
#include <projectexplorer/abstractprocessstep.h>
|
||||
#include <projectexplorer/buildconfiguration.h>
|
||||
@@ -17,7 +19,7 @@
|
||||
#include <projectexplorer/target.h>
|
||||
#include <projectexplorer/toolchain.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/filepath.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
@@ -31,8 +33,7 @@ using namespace Core;
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
namespace Ios {
|
||||
namespace Internal {
|
||||
namespace Ios::Internal {
|
||||
|
||||
const char IOS_BUILD_STEP_ID[] = "Ios.IosBuildStep";
|
||||
const char BUILD_USE_DEFAULT_ARGS_KEY[] = "Ios.IosBuildStep.XcodeArgumentsUseDefault";
|
||||
@@ -41,10 +42,8 @@ const char CLEAN_KEY[] = "Ios.IosBuildStep.Clean";
|
||||
|
||||
class IosBuildStep final : public AbstractProcessStep
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(Ios::Internal::IosBuildStep)
|
||||
|
||||
public:
|
||||
IosBuildStep(BuildStepList *stepList, Utils::Id id);
|
||||
IosBuildStep(BuildStepList *stepList, Id id);
|
||||
|
||||
private:
|
||||
QWidget *createConfigWidget() final;
|
||||
@@ -69,17 +68,17 @@ QWidget *IosBuildStep::createConfigWidget()
|
||||
{
|
||||
auto widget = new QWidget;
|
||||
|
||||
auto buildArgumentsLabel = new QLabel(tr("Base arguments:"), widget);
|
||||
auto buildArgumentsLabel = new QLabel(Tr::tr("Base arguments:"), widget);
|
||||
|
||||
auto buildArgumentsTextEdit = new QPlainTextEdit(widget);
|
||||
buildArgumentsTextEdit->setPlainText(ProcessArgs::joinArgs(baseArguments()));
|
||||
|
||||
auto resetDefaultsButton = new QPushButton(widget);
|
||||
resetDefaultsButton->setLayoutDirection(Qt::RightToLeft);
|
||||
resetDefaultsButton->setText(tr("Reset Defaults"));
|
||||
resetDefaultsButton->setText(Tr::tr("Reset Defaults"));
|
||||
resetDefaultsButton->setEnabled(!m_useDefaultArguments);
|
||||
|
||||
auto extraArgumentsLabel = new QLabel(tr("Extra arguments:"), widget);
|
||||
auto extraArgumentsLabel = new QLabel(Tr::tr("Extra arguments:"), widget);
|
||||
|
||||
auto extraArgumentsLineEdit = new QLineEdit(widget);
|
||||
extraArgumentsLineEdit->setText(ProcessArgs::joinArgs(m_extraArguments));
|
||||
@@ -91,7 +90,7 @@ QWidget *IosBuildStep::createConfigWidget()
|
||||
gridLayout->addWidget(extraArgumentsLabel, 2, 0, 1, 1);
|
||||
gridLayout->addWidget(extraArgumentsLineEdit, 2, 1, 1, 1);
|
||||
|
||||
setDisplayName(tr("iOS build", "iOS BuildStep display name."));
|
||||
setDisplayName(Tr::tr("iOS build", "iOS BuildStep display name."));
|
||||
|
||||
auto updateDetails = [this] {
|
||||
ProcessParameters param;
|
||||
@@ -255,8 +254,7 @@ IosBuildStepFactory::IosBuildStepFactory()
|
||||
Constants::IOS_SIMULATOR_TYPE});
|
||||
setSupportedStepLists({ProjectExplorer::Constants::BUILDSTEPS_CLEAN,
|
||||
ProjectExplorer::Constants::BUILDSTEPS_BUILD});
|
||||
setDisplayName(IosBuildStep::tr("xcodebuild"));
|
||||
setDisplayName(Tr::tr("xcodebuild"));
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Ios
|
||||
} // Ios::Internal
|
||||
|
||||
Reference in New Issue
Block a user