forked from qt-creator/qt-creator
Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -77,7 +77,7 @@ bool isClCompatibleCompiler(const QString &compilerName)
|
||||
return compilerName.endsWith("cl");
|
||||
}
|
||||
|
||||
Core::Id getCompilerId(QString compilerName)
|
||||
Utils::Id getCompilerId(QString compilerName)
|
||||
{
|
||||
if (Utils::HostOsInfo::isWindowsHost()) {
|
||||
if (compilerName.endsWith(".exe"))
|
||||
@@ -95,7 +95,7 @@ Core::Id getCompilerId(QString compilerName)
|
||||
return ProjectExplorer::Constants::CLANG_TOOLCHAIN_TYPEID;
|
||||
}
|
||||
|
||||
ToolChain *toolchainFromCompilerId(const Core::Id &compilerId, const Core::Id &language)
|
||||
ToolChain *toolchainFromCompilerId(const Utils::Id &compilerId, const Utils::Id &language)
|
||||
{
|
||||
return ToolChainManager::toolChain([&compilerId, &language](const ToolChain *tc) {
|
||||
if (!tc->isValid() || tc->language() != language)
|
||||
@@ -125,7 +125,7 @@ QString compilerPath(QString pathFlag)
|
||||
return QDir::fromNativeSeparators(pathFlag);
|
||||
}
|
||||
|
||||
ToolChain *toolchainFromFlags(const Kit *kit, const QStringList &flags, const Core::Id &language)
|
||||
ToolChain *toolchainFromFlags(const Kit *kit, const QStringList &flags, const Utils::Id &language)
|
||||
{
|
||||
if (flags.empty())
|
||||
return ToolChainKitAspect::toolChain(kit, language);
|
||||
@@ -138,7 +138,7 @@ ToolChain *toolchainFromFlags(const Kit *kit, const QStringList &flags, const Co
|
||||
if (toolchain)
|
||||
return toolchain;
|
||||
|
||||
Core::Id compilerId = getCompilerId(compiler.fileName());
|
||||
Utils::Id compilerId = getCompilerId(compiler.fileName());
|
||||
if ((toolchain = toolchainFromCompilerId(compilerId, language)))
|
||||
return toolchain;
|
||||
|
||||
@@ -518,7 +518,7 @@ CompilationDatabaseEditorFactory::CompilationDatabaseEditorFactory()
|
||||
class CompilationDatabaseBuildConfiguration : public BuildConfiguration
|
||||
{
|
||||
public:
|
||||
CompilationDatabaseBuildConfiguration(Target *target, Core::Id id)
|
||||
CompilationDatabaseBuildConfiguration(Target *target, Utils::Id id)
|
||||
: BuildConfiguration(target, id)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user