ProjectExplorer: Promote CMakeToolChainData to a global structure

... and use it in ToolChainFactory::detectForImport() overloads.

Change-Id: I107b9d5e185580b8fbef4c6e0233fdae5d253506
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-07-02 11:31:12 +02:00
parent 25f9d9c434
commit 2b7fab1668
10 changed files with 86 additions and 94 deletions

View File

@@ -73,13 +73,13 @@ QList<ToolChain *> NimToolChainFactory::autoDetect(const QList<ToolChain *> &alr
return result;
}
QList<ToolChain *> NimToolChainFactory::detectForImport(const FilePath &compilerPath, const Core::Id &language)
QList<ToolChain *> NimToolChainFactory::detectForImport(const ToolChainDescription &tcd)
{
QList<ToolChain *> result;
if (language == Constants::C_NIMLANGUAGE_ID) {
if (tcd.language == Constants::C_NIMLANGUAGE_ID) {
auto tc = new NimToolChain;
tc->setDetection(ToolChain::ManualDetection); // FIXME: sure?
tc->setCompilerCommand(compilerPath);
tc->setCompilerCommand(tcd.compilerPath);
result.append(tc);
}
return result;