ProjectExplorer: Consolidate *ToolChain::compilerCommand() implementations

All ToolChains had an compiler command member one way or the other, so have
one in the base class and drop all others.

ClangClToolChain is quirky insofar as it diverts the compilerCommand()
to the additional m_clangPath member. This is left for a later patch.

Change-Id: Ic8b5da17a4b7050966d0c37573edb0706fac2ecf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-11-13 09:39:32 +01:00
parent d30d0e05d8
commit c60c642fe5
18 changed files with 92 additions and 204 deletions

View File

@@ -308,6 +308,7 @@ public:
setLanguage(Constants::CXX_LANGUAGE_ID);
setTypeDisplayName("Test Tool Chain");
setTargetAbiNoSignal(Abi::hostAbi());
setCompilerCommand(FilePath::fromString("/tmp/test/gcc"));
}
static QList<TTC *> toolChains() { return m_toolChains; }
@@ -323,7 +324,6 @@ public:
{ Q_UNUSED(cxxflags) Q_UNUSED(sysRoot) return {}; }
void addToEnvironment(Environment &env) const override { Q_UNUSED(env) }
FilePath makeCommand(const Environment &) const override { return FilePath::fromString("make"); }
FilePath compilerCommand() const override { return Utils::FilePath::fromString("/tmp/test/gcc"); }
QList<OutputLineParser *> createOutputParsers() const override { return {}; }
std::unique_ptr<ToolChainConfigWidget> createConfigurationWidget() override { return nullptr; }
bool operator ==(const ToolChain &other) const override {