forked from qt-creator/qt-creator
ProjectExplorer: Remove ProcessParameters::resolveAll()
On all code paths, this was implicit in a ProcessParameters::setCommandLine() which was on all code paths either called directly immediately before, or as part of ProcessStep::setupProcessParameters(). With ProcessParameters::setCommandLine() as only user, this could be inlined there. The effectiveWorkingDirectory() turned out to be out of place and rather accidentally working there and was moved to ProcessParameters::setWorkingDirectory(). Change-Id: I634f6086c2324e3cbecd3e5d50e22afc722abd3f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -250,7 +250,6 @@ bool CMakeBuildStep::init()
|
||||
ProcessParameters *pp = processParameters();
|
||||
setupProcessParameters(pp);
|
||||
pp->setCommandLine(cmakeCommand(rc));
|
||||
pp->resolveAll();
|
||||
|
||||
return AbstractProcessStep::init();
|
||||
}
|
||||
|
@@ -107,7 +107,6 @@ bool NinjaBuildStep::init()
|
||||
// TODO check if the setup is ok
|
||||
ProjectExplorer::ProcessParameters *pp = processParameters();
|
||||
setupProcessParameters(pp);
|
||||
pp->resolveAll();
|
||||
|
||||
return AbstractProcessStep::init();
|
||||
}
|
||||
|
@@ -206,7 +206,6 @@ bool MakeStep::init()
|
||||
ProcessParameters *pp = processParameters();
|
||||
setupProcessParameters(pp);
|
||||
pp->setCommandLine(make);
|
||||
pp->resolveAll();
|
||||
|
||||
// If we are cleaning, then make can fail with an error code, but that doesn't mean
|
||||
// we should stop the clean queue
|
||||
|
@@ -63,7 +63,9 @@ void ProcessParameters::setCommandLine(const CommandLine &cmdLine)
|
||||
m_command = cmdLine;
|
||||
m_effectiveCommand.clear();
|
||||
m_effectiveArguments.clear();
|
||||
resolveAll();
|
||||
|
||||
effectiveCommand();
|
||||
effectiveArguments();
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +79,8 @@ void ProcessParameters::setWorkingDirectory(const FilePath &workingDirectory)
|
||||
{
|
||||
m_workingDirectory = workingDirectory;
|
||||
m_effectiveWorkingDirectory.clear();
|
||||
|
||||
effectiveWorkingDirectory();
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -201,11 +205,4 @@ QString ProcessParameters::summaryInWorkdir(const QString &displayName) const
|
||||
QDir::toNativeSeparators(effectiveWorkingDirectory().toString()));
|
||||
}
|
||||
|
||||
void ProcessParameters::resolveAll()
|
||||
{
|
||||
effectiveCommand();
|
||||
effectiveArguments();
|
||||
effectiveWorkingDirectory();
|
||||
}
|
||||
|
||||
} // ProcessExplorer
|
||||
|
@@ -69,7 +69,6 @@ public:
|
||||
QString summary(const QString &displayName) const;
|
||||
QString summaryInWorkdir(const QString &displayName) const;
|
||||
|
||||
void resolveAll();
|
||||
private:
|
||||
Utils::FilePath m_workingDirectory;
|
||||
Utils::CommandLine m_command;
|
||||
|
@@ -121,7 +121,6 @@ void ProcessStep::setupProcessParameters(ProcessParameters *pp)
|
||||
pp->setEnvironment(buildEnvironment());
|
||||
pp->setWorkingDirectory(FilePath::fromString(workingDirectory));
|
||||
pp->setCommandLine({m_command->filePath(), m_arguments->value(), CommandLine::Raw});
|
||||
pp->resolveAll();
|
||||
}
|
||||
|
||||
// ProcessStepFactory
|
||||
|
@@ -162,7 +162,6 @@ bool QmakeMakeStep::init()
|
||||
|
||||
pp->setEnvironment(makeEnvironment());
|
||||
pp->setCommandLine(makeCmd);
|
||||
pp->resolveAll();
|
||||
|
||||
auto rootNode = dynamic_cast<QmakeProFileNode *>(project()->rootProjectNode());
|
||||
QTC_ASSERT(rootNode, return false);
|
||||
|
Reference in New Issue
Block a user