Nim: Simplify NimCleanStep

Change-Id: I76213999b394fb18e228cf3c4d24a47c26afb398
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-06-25 12:29:12 +02:00
parent 1f0a4c0152
commit 7dc1b39a61
9 changed files with 10 additions and 167 deletions

View File

@@ -25,10 +25,10 @@
#include "nimcompilercleanstep.h"
#include "nimbuildconfiguration.h"
#include "nimcompilercleanstepconfigwidget.h"
#include "../nimconstants.h"
#include <projectexplorer/projectconfigurationaspects.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/qtcassert.h>
@@ -45,11 +45,15 @@ NimCompilerCleanStep::NimCompilerCleanStep(BuildStepList *parentList)
{
setDefaultDisplayName(tr("Nim Clean Step"));
setDisplayName(tr("Nim Clean Step"));
}
BuildStepConfigWidget *NimCompilerCleanStep::createConfigWidget()
{
return new NimCompilerCleanStepConfigWidget(this);
auto workingDirectory = addAspect<BaseStringAspect>();
workingDirectory->setLabelText(tr("Working directory:"));
workingDirectory->setDisplayStyle(BaseStringAspect::LineEditDisplay);
setSummaryUpdater([this, workingDirectory] {
workingDirectory->setFileName(buildConfiguration()->buildDirectory());
return displayName();
});
}
bool NimCompilerCleanStep::init()
@@ -122,7 +126,7 @@ NimCompilerCleanStepFactory::NimCompilerCleanStepFactory()
setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_CLEAN);
setSupportedConfiguration(Constants::C_NIMBUILDCONFIGURATION_ID);
setRepeatable(false);
setDisplayName(NimCompilerCleanStep::tr(Nim::Constants::C_NIMCOMPILERCLEANSTEP_DISPLAY));
setDisplayName(NimCompilerCleanStep::tr("Nim Compiler Clean Step"));
}
} // Nim