forked from qt-creator/qt-creator
Nim: Use aspect more directly in NimCompilerCleanStep
Change-Id: I8433dfa96c65ea3e1f7e9b0daef2e64e6cc65684 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -23,7 +23,17 @@ namespace Nim {
|
|||||||
class NimCompilerCleanStep final : public BuildStep
|
class NimCompilerCleanStep final : public BuildStep
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NimCompilerCleanStep(BuildStepList *parentList, Id id);
|
NimCompilerCleanStep(BuildStepList *parentList, Id id)
|
||||||
|
: BuildStep(parentList, id)
|
||||||
|
{
|
||||||
|
workingDir.setLabelText(Tr::tr("Working directory:"));
|
||||||
|
workingDir.setDisplayStyle(StringAspect::LineEditDisplay);
|
||||||
|
|
||||||
|
setSummaryUpdater([this] {
|
||||||
|
workingDir.setValue(buildDirectory());
|
||||||
|
return displayName();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool init() final;
|
bool init() final;
|
||||||
@@ -34,21 +44,9 @@ private:
|
|||||||
bool removeOutFilePath();
|
bool removeOutFilePath();
|
||||||
|
|
||||||
FilePath m_buildDir;
|
FilePath m_buildDir;
|
||||||
|
FilePathAspect workingDir{this};
|
||||||
};
|
};
|
||||||
|
|
||||||
NimCompilerCleanStep::NimCompilerCleanStep(BuildStepList *parentList, Id id)
|
|
||||||
: BuildStep(parentList, id)
|
|
||||||
{
|
|
||||||
auto workingDirectory = addAspect<FilePathAspect>();
|
|
||||||
workingDirectory->setLabelText(Tr::tr("Working directory:"));
|
|
||||||
workingDirectory->setDisplayStyle(StringAspect::LineEditDisplay);
|
|
||||||
|
|
||||||
setSummaryUpdater([this, workingDirectory] {
|
|
||||||
workingDirectory->setValue(buildDirectory());
|
|
||||||
return displayName();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool NimCompilerCleanStep::init()
|
bool NimCompilerCleanStep::init()
|
||||||
{
|
{
|
||||||
FilePath buildDir = buildDirectory();
|
FilePath buildDir = buildDirectory();
|
||||||
|
Reference in New Issue
Block a user