forked from qt-creator/qt-creator
ProjectExplorer: Rename one ToolChainFactory::autoDetect overload
... to detectForImport(). The overloads have different purposes, sharing the name makes reasoning about them hard. Change-Id: I57bfbbc1aa06ef85251e39c404bdbe5584a2ea41 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -73,7 +73,7 @@ QList<ToolChain *> NimToolChainFactory::autoDetect(const QList<ToolChain *> &alr
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<ToolChain *> NimToolChainFactory::autoDetect(const FilePath &compilerPath, const Core::Id &language)
|
||||
QList<ToolChain *> NimToolChainFactory::detectForImport(const FilePath &compilerPath, const Core::Id &language)
|
||||
{
|
||||
QList<ToolChain *> result;
|
||||
if (language == Constants::C_NIMLANGUAGE_ID) {
|
||||
|
@@ -42,7 +42,7 @@ public:
|
||||
NimToolChainFactory();
|
||||
|
||||
QList<ProjectExplorer::ToolChain *> autoDetect(const QList<ProjectExplorer::ToolChain *> &alreadyKnown) final;
|
||||
QList<ProjectExplorer::ToolChain *> autoDetect(const Utils::FilePath &compilerPath, const Core::Id &language) final;
|
||||
QList<ProjectExplorer::ToolChain *> detectForImport(const Utils::FilePath &compilerPath, const Core::Id &language) final;
|
||||
};
|
||||
|
||||
class NimToolChainConfigWidget : public ProjectExplorer::ToolChainConfigWidget
|
||||
|
@@ -880,7 +880,7 @@ QList<ToolChain *> GccToolChainFactory::autoDetect(const QList<ToolChain *> &alr
|
||||
return tcs;
|
||||
}
|
||||
|
||||
QList<ToolChain *> GccToolChainFactory::autoDetect(const FilePath &compilerPath, const Core::Id &language)
|
||||
QList<ToolChain *> GccToolChainFactory::detectForImport(const FilePath &compilerPath, const Core::Id &language)
|
||||
{
|
||||
const QString fileName = compilerPath.fileName();
|
||||
if ((language == Constants::C_LANGUAGE_ID && (fileName.startsWith("gcc")
|
||||
@@ -1455,7 +1455,7 @@ QList<ToolChain *> ClangToolChainFactory::autoDetect(const QList<ToolChain *> &a
|
||||
return tcs;
|
||||
}
|
||||
|
||||
QList<ToolChain *> ClangToolChainFactory::autoDetect(const FilePath &compilerPath, const Core::Id &language)
|
||||
QList<ToolChain *> ClangToolChainFactory::detectForImport(const FilePath &compilerPath, const Core::Id &language)
|
||||
{
|
||||
const QString fileName = compilerPath.fileName();
|
||||
if ((language == Constants::C_LANGUAGE_ID && fileName.startsWith("clang") && !fileName.startsWith("clang++"))
|
||||
@@ -1637,7 +1637,7 @@ QList<ToolChain *> MingwToolChainFactory::autoDetect(const QList<ToolChain *> &a
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<ToolChain *> MingwToolChainFactory::autoDetect(const FilePath &compilerPath, const Core::Id &language)
|
||||
QList<ToolChain *> MingwToolChainFactory::detectForImport(const FilePath &compilerPath, const Core::Id &language)
|
||||
{
|
||||
const QString fileName = compilerPath.fileName();
|
||||
if ((language == Constants::C_LANGUAGE_ID && (fileName.startsWith("gcc")
|
||||
@@ -1714,7 +1714,7 @@ QList<ToolChain *> LinuxIccToolChainFactory::autoDetect(const QList<ToolChain *>
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<ToolChain *> LinuxIccToolChainFactory::autoDetect(const FilePath &compilerPath, const Core::Id &language)
|
||||
QList<ToolChain *> LinuxIccToolChainFactory::detectForImport(const FilePath &compilerPath, const Core::Id &language)
|
||||
{
|
||||
const QString fileName = compilerPath.fileName();
|
||||
if ((language == Constants::CXX_LANGUAGE_ID && fileName.startsWith("icpc")) ||
|
||||
|
@@ -55,7 +55,7 @@ public:
|
||||
GccToolChainFactory();
|
||||
|
||||
QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown) override;
|
||||
QList<ToolChain *> autoDetect(const Utils::FilePath &compilerPath, const Core::Id &language) override;
|
||||
QList<ToolChain *> detectForImport(const Utils::FilePath &compilerPath, const Core::Id &language) override;
|
||||
|
||||
protected:
|
||||
enum class DetectVariants { Yes, No };
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
ClangToolChainFactory();
|
||||
|
||||
QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown) override;
|
||||
QList<ToolChain *> autoDetect(const Utils::FilePath &compilerPath, const Core::Id &language) final;
|
||||
QList<ToolChain *> detectForImport(const Utils::FilePath &compilerPath, const Core::Id &language) final;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
MingwToolChainFactory();
|
||||
|
||||
QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown) override;
|
||||
QList<ToolChain *> autoDetect(const Utils::FilePath &compilerPath, const Core::Id &language) final;
|
||||
QList<ToolChain *> detectForImport(const Utils::FilePath &compilerPath, const Core::Id &language) final;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
LinuxIccToolChainFactory();
|
||||
|
||||
QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown) override;
|
||||
QList<ToolChain *> autoDetect(const Utils::FilePath &compilerPath, const Core::Id &language) final;
|
||||
QList<ToolChain *> detectForImport(const Utils::FilePath &compilerPath, const Core::Id &language) final;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
@@ -372,7 +372,7 @@ createToolChains(const Utils::FilePath &toolChainPath, const Core::Id &language)
|
||||
ProjectImporter::ToolChainData data;
|
||||
|
||||
for (ToolChainFactory *factory : ToolChainFactory::allToolChainFactories()) {
|
||||
data.tcs = factory->autoDetect(toolChainPath, language);
|
||||
data.tcs = factory->detectForImport(toolChainPath, language);
|
||||
if (data.tcs.isEmpty())
|
||||
continue;
|
||||
|
||||
|
@@ -442,7 +442,7 @@ QList<ToolChain *> ToolChainFactory::autoDetect(const QList<ToolChain *> &alread
|
||||
return QList<ToolChain *>();
|
||||
}
|
||||
|
||||
QList<ToolChain *> ToolChainFactory::autoDetect(const Utils::FilePath &compilerPath, const Core::Id &language)
|
||||
QList<ToolChain *> ToolChainFactory::detectForImport(const Utils::FilePath &compilerPath, const Core::Id &language)
|
||||
{
|
||||
Q_UNUSED(compilerPath);
|
||||
Q_UNUSED(language);
|
||||
|
@@ -199,7 +199,7 @@ public:
|
||||
Core::Id supportedToolChainType() const;
|
||||
|
||||
virtual QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown);
|
||||
virtual QList<ToolChain *> autoDetect(const Utils::FilePath &compilerPath, const Core::Id &language);
|
||||
virtual QList<ToolChain *> detectForImport(const Utils::FilePath &compilerPath, const Core::Id &language);
|
||||
|
||||
virtual bool canCreate() const;
|
||||
virtual ToolChain *create();
|
||||
|
Reference in New Issue
Block a user