diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-05-17 15:42:38 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-05-22 13:45:27 +0000 |
commit | 981a98f34f81b9fa243e05d7c6da42ef4afd3c2c (patch) | |
tree | 686f2f6c108e5f1a64ff7c8f8493bacb107c86f5 /src/plugins | |
parent | 58bd043e2722e7670008fb180faf982294221d4c (diff) | |
download | qt-creator-981a98f34f81b9fa243e05d7c6da42ef4afd3c2c.tar.gz |
Make step is always called "Make"
So provide it through the base class, also for the factories.
Change-Id: Ie4a6113b785ec6c0ddde694ec0bcd11a26331c39
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/genericprojectmanager/genericmakestep.cpp | 10 | ||||
-rw-r--r-- | src/plugins/projectexplorer/makestep.cpp | 6 | ||||
-rw-r--r-- | src/plugins/projectexplorer/makestep.h | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakemakestep.cpp | 3 |
4 files changed, 11 insertions, 10 deletions
diff --git a/src/plugins/genericprojectmanager/genericmakestep.cpp b/src/plugins/genericprojectmanager/genericmakestep.cpp index 00edf3a1d4..62d7c1265e 100644 --- a/src/plugins/genericprojectmanager/genericmakestep.cpp +++ b/src/plugins/genericprojectmanager/genericmakestep.cpp @@ -38,14 +38,10 @@ namespace GenericProjectManager { namespace Internal { const char GENERIC_MS_ID[] = "GenericProjectManager.GenericMakeStep"; -const char GENERIC_MS_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("GenericProjectManager::Internal::GenericMakeStep", - "Make"); GenericMakeStep::GenericMakeStep(BuildStepList *parent, const QString &buildTarget) : MakeStep(parent, GENERIC_MS_ID, buildTarget, {"all", "clean"}) { - setDefaultDisplayName(QCoreApplication::translate("GenericProjectManager::Internal::GenericMakeStep", - GENERIC_MS_DISPLAY_NAME)); } bool GenericMakeStep::init(QList<const BuildStep *> &earlierSteps) @@ -99,8 +95,7 @@ GenericMakeAllStepFactory::GenericMakeAllStepFactory() }; registerStep<Step>(GENERIC_MS_ID); - setDisplayName(QCoreApplication::translate( - "GenericProjectManager::Internal::GenericMakeStep", GENERIC_MS_DISPLAY_NAME)); + setDisplayName(MakeStep::defaultDisplayName()); setSupportedProjectType(Constants::GENERICPROJECT_ID); setSupportedStepLists({ProjectExplorer::Constants::BUILDSTEPS_BUILD, ProjectExplorer::Constants::BUILDSTEPS_DEPLOY}); @@ -122,8 +117,7 @@ GenericMakeCleanStepFactory::GenericMakeCleanStepFactory() }; registerStep<Step>(GENERIC_MS_ID); - setDisplayName(QCoreApplication::translate( - "GenericProjectManager::Internal::GenericMakeStep", GENERIC_MS_DISPLAY_NAME)); + setDisplayName(MakeStep::defaultDisplayName()); setSupportedProjectType(Constants::GENERICPROJECT_ID); setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_CLEAN); } diff --git a/src/plugins/projectexplorer/makestep.cpp b/src/plugins/projectexplorer/makestep.cpp index 70853ac8f2..82b36f0127 100644 --- a/src/plugins/projectexplorer/makestep.cpp +++ b/src/plugins/projectexplorer/makestep.cpp @@ -54,6 +54,7 @@ MakeStep::MakeStep(BuildStepList *parent, : AbstractProcessStep(parent, id), m_availableTargets(availableTargets) { + setDefaultDisplayName(defaultDisplayName()); if (!buildTarget.isEmpty()) setBuildTarget(buildTarget, true); } @@ -68,6 +69,11 @@ bool MakeStep::isClean() const return m_clean; } +QString MakeStep::defaultDisplayName() +{ + return tr("Make"); +} + void MakeStep::setMakeCommand(const QString &command) { m_makeCommand = command; diff --git a/src/plugins/projectexplorer/makestep.h b/src/plugins/projectexplorer/makestep.h index c3f63016e4..df87923e04 100644 --- a/src/plugins/projectexplorer/makestep.h +++ b/src/plugins/projectexplorer/makestep.h @@ -61,6 +61,8 @@ public: void setClean(bool clean); bool isClean() const; + static QString defaultDisplayName(); + private: QVariantMap toMap() const override; bool fromMap(const QVariantMap &map) override; diff --git a/src/plugins/qmakeprojectmanager/qmakemakestep.cpp b/src/plugins/qmakeprojectmanager/qmakemakestep.cpp index c853e5d614..4bd69c93ef 100644 --- a/src/plugins/qmakeprojectmanager/qmakemakestep.cpp +++ b/src/plugins/qmakeprojectmanager/qmakemakestep.cpp @@ -54,7 +54,6 @@ const char MAKESTEP_BS_ID[] = "Qt4ProjectManager.MakeStep"; QmakeMakeStep::QmakeMakeStep(BuildStepList *bsl) : MakeStep(bsl, MAKESTEP_BS_ID) { - setDefaultDisplayName(tr("Make", "Qt MakeStep display name.")); if (bsl->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN) { setClean(true); setUserArguments("clean"); @@ -208,5 +207,5 @@ QmakeMakeStepFactory::QmakeMakeStepFactory() { registerStep<QmakeMakeStep>(MAKESTEP_BS_ID); setSupportedProjectType(Constants::QMAKEPROJECT_ID); - setDisplayName(tr("Make")); + setDisplayName(MakeStep::defaultDisplayName()); } |