aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIvan Donchevskii <ivan.donchevskii@qt.io>2018-09-17 11:29:32 +0200
committerIvan Donchevskii <ivan.donchevskii@qt.io>2018-09-17 11:24:32 +0000
commit0bd095aa4550eac51d026c96e5128720bf867a41 (patch)
tree3c9a36fc38b603884a8eabcb47c4511fceed91ad /src
parent3170d05087f3e1993bef1f9447a8bbd14a32a891 (diff)
ProjectExplorer: Rename compiler includes from System to BuiltIn
System include are those used with -isystem keyword, built-in includes on the other hand come from compiler and always follow in the end of the include list (after system includes). Change-Id: I95c2fec36d2e5b43f014fe0a88d59c6769edfa1f Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/android/androidtoolchain.cpp18
-rw-r--r--src/plugins/android/androidtoolchain.h2
-rw-r--r--src/plugins/cmakeprojectmanager/tealeafreader.cpp2
-rw-r--r--src/plugins/cpptools/compileroptionsbuilder.cpp34
-rw-r--r--src/plugins/cpptools/cppcodemodelinspectordumper.cpp2
-rw-r--r--src/plugins/cpptools/cppprojectinfogenerator.cpp4
-rw-r--r--src/plugins/cpptools/cppsourceprocessor.cpp6
-rw-r--r--src/plugins/cpptools/projectinfo.cpp2
-rw-r--r--src/plugins/cpptools/projectinfo.h2
-rw-r--r--src/plugins/nim/project/nimtoolchain.cpp6
-rw-r--r--src/plugins/nim/project/nimtoolchain.h6
-rw-r--r--src/plugins/projectexplorer/abstractmsvctoolchain.cpp8
-rw-r--r--src/plugins/projectexplorer/abstractmsvctoolchain.h4
-rw-r--r--src/plugins/projectexplorer/customtoolchain.cpp24
-rw-r--r--src/plugins/projectexplorer/customtoolchain.h8
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.cpp16
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.h6
-rw-r--r--src/plugins/projectexplorer/headerpath.h3
-rw-r--r--src/plugins/projectexplorer/toolchain.h8
-rw-r--r--src/plugins/projectexplorer/toolchainsettingsaccessor.cpp4
20 files changed, 87 insertions, 78 deletions
diff --git a/src/plugins/android/androidtoolchain.cpp b/src/plugins/android/androidtoolchain.cpp
index a124b29da1..9540b16240 100644
--- a/src/plugins/android/androidtoolchain.cpp
+++ b/src/plugins/android/androidtoolchain.cpp
@@ -106,8 +106,8 @@ static QString getArch(const QString &triple)
// Paths added here are those that were used by qmake. They were taken from
// *qtsource*/qtbase/mkspecs/common/android-base-head.conf
// Adding them here allows us to use them for all build systems.
-static void addSystemHeaderPaths(ProjectExplorer::HeaderPaths &paths,
- const QString &triple, const QString &version)
+static void addBuiltInHeaderPaths(ProjectExplorer::HeaderPaths &paths,
+ const QString &triple, const QString &version)
{
const Utils::FileName ndkPath = AndroidConfigurations::currentConfig().ndkLocation();
@@ -120,24 +120,24 @@ static void addSystemHeaderPaths(ProjectExplorer::HeaderPaths &paths,
Utils::FileName includePath = stdcppPath;
Utils::FileName cppLibsPath = stdcppPath;
cppLibsPath.appendPath("libs/" + getArch(triple) + "/include/");
- paths.prepend({cppLibsPath.toString(), ProjectExplorer::HeaderPathType::System});
+ paths.prepend({cppLibsPath.toString(), ProjectExplorer::HeaderPathType::BuiltIn});
includePath.appendPath("include/");
- paths.prepend({includePath.toString(), ProjectExplorer::HeaderPathType::System});
+ paths.prepend({includePath.toString(), ProjectExplorer::HeaderPathType::BuiltIn});
paths.prepend({ndkPath.toString() + "/sysroot/usr/include/" + triple,
- ProjectExplorer::HeaderPathType::System});
+ ProjectExplorer::HeaderPathType::BuiltIn});
paths.prepend({ndkPath.toString() + "/sysroot/usr/include",
- ProjectExplorer::HeaderPathType::System});
+ ProjectExplorer::HeaderPathType::BuiltIn});
}
-AndroidToolChain::SystemHeaderPathsRunner AndroidToolChain::createSystemHeaderPathsRunner() const
+AndroidToolChain::BuiltInHeaderPathsRunner AndroidToolChain::createBuiltInHeaderPathsRunner() const
{
const QString triple = originalTargetTriple();
const QString version = this->version();
initExtraHeaderPathsFunction([triple, version] (HeaderPaths &paths) {
- addSystemHeaderPaths(paths, triple, version);
+ addBuiltInHeaderPaths(paths, triple, version);
});
- return GccToolChain::createSystemHeaderPathsRunner();
+ return GccToolChain::createBuiltInHeaderPathsRunner();
}
QString AndroidToolChain::typeDisplayName() const
diff --git a/src/plugins/android/androidtoolchain.h b/src/plugins/android/androidtoolchain.h
index 0352bfe94e..ee54b94e96 100644
--- a/src/plugins/android/androidtoolchain.h
+++ b/src/plugins/android/androidtoolchain.h
@@ -58,7 +58,7 @@ public:
bool isSecondaryToolChain() const;
void setSecondaryToolChain(bool b);
- SystemHeaderPathsRunner createSystemHeaderPathsRunner() const override;
+ BuiltInHeaderPathsRunner createBuiltInHeaderPathsRunner() const override;
protected:
DetectedAbisResult detectSupportedAbis() const override;
diff --git a/src/plugins/cmakeprojectmanager/tealeafreader.cpp b/src/plugins/cmakeprojectmanager/tealeafreader.cpp
index 24f143ed3a..e25a25a96b 100644
--- a/src/plugins/cmakeprojectmanager/tealeafreader.cpp
+++ b/src/plugins/cmakeprojectmanager/tealeafreader.cpp
@@ -334,7 +334,7 @@ static void processCMakeIncludes(const CMakeBuildTarget &cbt, const ToolChain *t
if (!tc)
return;
- foreach (const HeaderPath &hp, tc->systemHeaderPaths(flags, sysroot))
+ foreach (const HeaderPath &hp, tc->builtInHeaderPaths(flags, sysroot))
tcIncludes.insert(FileName::fromString(hp.path));
foreach (const FileName &i, cbt.includeFiles) {
if (!tcIncludes.contains(i))
diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp
index b0a5b5633e..38fa94e83d 100644
--- a/src/plugins/cpptools/compileroptionsbuilder.cpp
+++ b/src/plugins/cpptools/compileroptionsbuilder.cpp
@@ -200,7 +200,9 @@ void CompilerOptionsBuilder::addHeaderPathOptions()
{
using ProjectExplorer::HeaderPathType;
- QStringList result;
+ QStringList includes;
+ QStringList systemIncludes;
+ QStringList builtInIncludes;
for (const ProjectExplorer::HeaderPath &headerPath : qAsConst(m_projectPart.headerPaths)) {
if (headerPath.path.isEmpty())
@@ -209,29 +211,33 @@ void CompilerOptionsBuilder::addHeaderPathOptions()
if (excludeHeaderPath(headerPath.path))
continue;
- QString prefix;
- Utils::FileName path;
switch (headerPath.type) {
case HeaderPathType::Framework:
- prefix = QLatin1String("-F");
- break;
- case HeaderPathType::System:
- prefix = m_useSystemHeader == UseSystemHeader::No
- ? QLatin1String("-I")
- : QLatin1String("-isystem");
+ includes.append("-F");
+ includes.append(QDir::toNativeSeparators(headerPath.path));
break;
default: // This shouldn't happen, but let's be nice..:
// intentional fall-through:
case HeaderPathType::User:
- prefix = includeDirOptionForPath(headerPath.path);
+ includes.append(includeDirOptionForPath(headerPath.path));
+ includes.append(QDir::toNativeSeparators(headerPath.path));
+ break;
+ case HeaderPathType::BuiltIn:
+ builtInIncludes.append("-isystem");
+ builtInIncludes.append(QDir::toNativeSeparators(headerPath.path));
+ break;
+ case HeaderPathType::System:
+ systemIncludes.append(m_useSystemHeader == UseSystemHeader::No
+ ? QLatin1String("-I")
+ : QLatin1String("-isystem"));
+ systemIncludes.append(QDir::toNativeSeparators(headerPath.path));
break;
}
-
- result.append(prefix);
- result.append(QDir::toNativeSeparators(headerPath.path));
}
- m_options.append(result);
+ m_options.append(includes);
+ m_options.append(systemIncludes);
+ m_options.append(builtInIncludes);
}
void CompilerOptionsBuilder::addPrecompiledHeaderOptions(PchUsage pchUsage)
diff --git a/src/plugins/cpptools/cppcodemodelinspectordumper.cpp b/src/plugins/cpptools/cppcodemodelinspectordumper.cpp
index 86b5c57d45..6a0c1fe124 100644
--- a/src/plugins/cpptools/cppcodemodelinspectordumper.cpp
+++ b/src/plugins/cpptools/cppcodemodelinspectordumper.cpp
@@ -96,6 +96,7 @@ QString Utils::toString(ProjectExplorer::HeaderPathType type)
CASE_LANGUAGEVERSION(User);
CASE_LANGUAGEVERSION(System);
CASE_LANGUAGEVERSION(Framework);
+ CASE_LANGUAGEVERSION(BuiltIn);
// no default to get a compiler warning if anything is added
}
#undef CASE_LANGUAGEVERSION
@@ -472,6 +473,7 @@ static void printIncludeType(QTextStream &out, ProjectExplorer::HeaderPathType t
case HeaderPathType::User: out << "(user include path)"; break;
case HeaderPathType::System: out << "(system include path)"; break;
case HeaderPathType::Framework: out << "(framework path)"; break;
+ case HeaderPathType::BuiltIn: out << "(built-in include path)"; break;
}
}
diff --git a/src/plugins/cpptools/cppprojectinfogenerator.cpp b/src/plugins/cpptools/cppprojectinfogenerator.cpp
index f7d6ed1dbd..133a5237d2 100644
--- a/src/plugins/cpptools/cppprojectinfogenerator.cpp
+++ b/src/plugins/cpptools/cppprojectinfogenerator.cpp
@@ -116,12 +116,12 @@ private:
if (!m_tcInfo.headerPathsRunner)
return; // No compiler set in kit.
- const ProjectExplorer::HeaderPaths systemHeaderPaths
+ const ProjectExplorer::HeaderPaths builtInHeaderPaths
= m_tcInfo.headerPathsRunner(m_flags.commandLineFlags,
m_tcInfo.sysRootPath);
ProjectExplorer::HeaderPaths &headerPaths = m_projectPart.headerPaths;
- for (const ProjectExplorer::HeaderPath &header : systemHeaderPaths) {
+ for (const ProjectExplorer::HeaderPath &header : builtInHeaderPaths) {
const ProjectExplorer::HeaderPath headerPath{header.path, header.type};
if (!headerPaths.contains(headerPath))
headerPaths.push_back(headerPath);
diff --git a/src/plugins/cpptools/cppsourceprocessor.cpp b/src/plugins/cpptools/cppsourceprocessor.cpp
index 54e93ce41a..11f266b6a5 100644
--- a/src/plugins/cpptools/cppsourceprocessor.cpp
+++ b/src/plugins/cpptools/cppsourceprocessor.cpp
@@ -138,10 +138,10 @@ void CppSourceProcessor::setHeaderPaths(const ProjectExplorer::HeaderPaths &head
for (int i = 0, ei = headerPaths.size(); i < ei; ++i) {
const ProjectExplorer::HeaderPath &path = headerPaths.at(i);
- if (path.type == HeaderPathType::User || path.type == HeaderPathType::System)
- m_headerPaths.append({cleanPath(path.path), path.type});
- else
+ if (path.type == HeaderPathType::Framework )
addFrameworkPath(path);
+ else
+ m_headerPaths.append({cleanPath(path.path), path.type});
}
}
diff --git a/src/plugins/cpptools/projectinfo.cpp b/src/plugins/cpptools/projectinfo.cpp
index 44c4fbe35b..adcabc9095 100644
--- a/src/plugins/cpptools/projectinfo.cpp
+++ b/src/plugins/cpptools/projectinfo.cpp
@@ -47,7 +47,7 @@ ToolChainInfo::ToolChainInfo(const ProjectExplorer::ToolChain *toolChain,
// ...and save the potentially expensive operations for later so that
// they can be run from a worker thread.
sysRootPath = ProjectExplorer::SysRootKitInformation::sysRoot(kit).toString();
- headerPathsRunner = toolChain->createSystemHeaderPathsRunner();
+ headerPathsRunner = toolChain->createBuiltInHeaderPathsRunner();
predefinedMacrosRunner = toolChain->createPredefinedMacrosRunner();
}
}
diff --git a/src/plugins/cpptools/projectinfo.h b/src/plugins/cpptools/projectinfo.h
index c36eaa792d..8b30998744 100644
--- a/src/plugins/cpptools/projectinfo.h
+++ b/src/plugins/cpptools/projectinfo.h
@@ -57,7 +57,7 @@ public:
QStringList extraCodeModelFlags;
QString sysRootPath; // For headerPathsRunner.
- ProjectExplorer::ToolChain::SystemHeaderPathsRunner headerPathsRunner;
+ ProjectExplorer::ToolChain::BuiltInHeaderPathsRunner headerPathsRunner;
ProjectExplorer::ToolChain::PredefinedMacrosRunner predefinedMacrosRunner;
};
diff --git a/src/plugins/nim/project/nimtoolchain.cpp b/src/plugins/nim/project/nimtoolchain.cpp
index 0f0ecaf061..01147f4fa1 100644
--- a/src/plugins/nim/project/nimtoolchain.cpp
+++ b/src/plugins/nim/project/nimtoolchain.cpp
@@ -97,12 +97,12 @@ WarningFlags NimToolChain::warningFlags(const QStringList &) const
return WarningFlags::NoWarnings;
}
-ToolChain::SystemHeaderPathsRunner NimToolChain::createSystemHeaderPathsRunner() const
+ToolChain::BuiltInHeaderPathsRunner NimToolChain::createBuiltInHeaderPathsRunner() const
{
- return ToolChain::SystemHeaderPathsRunner();
+ return ToolChain::BuiltInHeaderPathsRunner();
}
-HeaderPaths NimToolChain::systemHeaderPaths(const QStringList &, const FileName &) const
+HeaderPaths NimToolChain::builtInHeaderPaths(const QStringList &, const FileName &) const
{
return {};
}
diff --git a/src/plugins/nim/project/nimtoolchain.h b/src/plugins/nim/project/nimtoolchain.h
index ac7324acf6..7b25e993de 100644
--- a/src/plugins/nim/project/nimtoolchain.h
+++ b/src/plugins/nim/project/nimtoolchain.h
@@ -45,9 +45,9 @@ public:
CompilerFlags compilerFlags(const QStringList &flags) const final;
ProjectExplorer::WarningFlags warningFlags(const QStringList &flags) const final;
- SystemHeaderPathsRunner createSystemHeaderPathsRunner() const override;
- ProjectExplorer::HeaderPaths systemHeaderPaths(const QStringList &flags,
- const Utils::FileName &sysRoot) const final;
+ BuiltInHeaderPathsRunner createBuiltInHeaderPathsRunner() const override;
+ ProjectExplorer::HeaderPaths builtInHeaderPaths(const QStringList &flags,
+ const Utils::FileName &sysRoot) const final;
void addToEnvironment(Utils::Environment &env) const final;
QString makeCommand(const Utils::Environment &env) const final;
Utils::FileName compilerCommand() const final;
diff --git a/src/plugins/projectexplorer/abstractmsvctoolchain.cpp b/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
index 375c11bbbc..934265610a 100644
--- a/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
+++ b/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
@@ -210,7 +210,7 @@ WarningFlags AbstractMsvcToolChain::warningFlags(const QStringList &cflags) cons
return flags;
}
-ToolChain::SystemHeaderPathsRunner AbstractMsvcToolChain::createSystemHeaderPathsRunner() const
+ToolChain::BuiltInHeaderPathsRunner AbstractMsvcToolChain::createBuiltInHeaderPathsRunner() const
{
Utils::Environment env(m_lastEnvironment);
addToEnvironment(env);
@@ -219,16 +219,16 @@ ToolChain::SystemHeaderPathsRunner AbstractMsvcToolChain::createSystemHeaderPath
QMutexLocker locker(m_headerPathsMutex);
if (m_headerPaths.isEmpty()) {
foreach (const QString &path, env.value(QLatin1String("INCLUDE")).split(QLatin1Char(';')))
- m_headerPaths.append({path, HeaderPathType::System});
+ m_headerPaths.append({path, HeaderPathType::BuiltIn});
}
return m_headerPaths;
};
}
-HeaderPaths AbstractMsvcToolChain::systemHeaderPaths(const QStringList &cxxflags,
+HeaderPaths AbstractMsvcToolChain::builtInHeaderPaths(const QStringList &cxxflags,
const Utils::FileName &sysRoot) const
{
- return createSystemHeaderPathsRunner()(cxxflags, sysRoot.toString());
+ return createBuiltInHeaderPathsRunner()(cxxflags, sysRoot.toString());
}
void AbstractMsvcToolChain::addToEnvironment(Utils::Environment &env) const
diff --git a/src/plugins/projectexplorer/abstractmsvctoolchain.h b/src/plugins/projectexplorer/abstractmsvctoolchain.h
index 55989f447e..2979e728cc 100644
--- a/src/plugins/projectexplorer/abstractmsvctoolchain.h
+++ b/src/plugins/projectexplorer/abstractmsvctoolchain.h
@@ -57,8 +57,8 @@ public:
Macros predefinedMacros(const QStringList &cxxflags) const override;
CompilerFlags compilerFlags(const QStringList &cxxflags) const override;
WarningFlags warningFlags(const QStringList &cflags) const override;
- SystemHeaderPathsRunner createSystemHeaderPathsRunner() const override;
- HeaderPaths systemHeaderPaths(const QStringList &cxxflags,
+ BuiltInHeaderPathsRunner createBuiltInHeaderPathsRunner() const override;
+ HeaderPaths builtInHeaderPaths(const QStringList &cxxflags,
const Utils::FileName &sysRoot) const override;
void addToEnvironment(Utils::Environment &env) const override;
diff --git a/src/plugins/projectexplorer/customtoolchain.cpp b/src/plugins/projectexplorer/customtoolchain.cpp
index ab00833738..f9cb0a81a7 100644
--- a/src/plugins/projectexplorer/customtoolchain.cpp
+++ b/src/plugins/projectexplorer/customtoolchain.cpp
@@ -166,27 +166,27 @@ void CustomToolChain::setPredefinedMacros(const Macros &macros)
toolChainUpdated();
}
-ToolChain::SystemHeaderPathsRunner CustomToolChain::createSystemHeaderPathsRunner() const
+ToolChain::BuiltInHeaderPathsRunner CustomToolChain::createBuiltInHeaderPathsRunner() const
{
- const HeaderPaths systemHeaderPaths = m_systemHeaderPaths;
+ const HeaderPaths builtInHeaderPaths = m_builtInHeaderPaths;
// This runner must be thread-safe!
- return [systemHeaderPaths](const QStringList &cxxFlags, const QString &) {
+ return [builtInHeaderPaths](const QStringList &cxxFlags, const QString &) {
HeaderPaths flagHeaderPaths;
for (const QString &cxxFlag : cxxFlags) {
if (cxxFlag.startsWith(QLatin1String("-I"))) {
- flagHeaderPaths.push_back({cxxFlag.mid(2).trimmed(), HeaderPathType::System});
+ flagHeaderPaths.push_back({cxxFlag.mid(2).trimmed(), HeaderPathType::BuiltIn});
}
}
- return systemHeaderPaths + flagHeaderPaths;
+ return builtInHeaderPaths + flagHeaderPaths;
};
}
-HeaderPaths CustomToolChain::systemHeaderPaths(const QStringList &cxxFlags,
+HeaderPaths CustomToolChain::builtInHeaderPaths(const QStringList &cxxFlags,
const FileName &fileName) const
{
- return createSystemHeaderPathsRunner()(cxxFlags, fileName.toString());
+ return createBuiltInHeaderPathsRunner()(cxxFlags, fileName.toString());
}
void CustomToolChain::addToEnvironment(Environment &env) const
@@ -222,18 +222,18 @@ IOutputParser *CustomToolChain::outputParser() const
QStringList CustomToolChain::headerPathsList() const
{
- return Utils::transform<QList>(m_systemHeaderPaths, &HeaderPath::path);
+ return Utils::transform<QList>(m_builtInHeaderPaths, &HeaderPath::path);
}
void CustomToolChain::setHeaderPaths(const QStringList &list)
{
HeaderPaths tmp = Utils::transform<QVector>(list, [](const QString &headerPath) {
- return HeaderPath(headerPath.trimmed(), HeaderPathType::System);
+ return HeaderPath(headerPath.trimmed(), HeaderPathType::BuiltIn);
});
- if (m_systemHeaderPaths == tmp)
+ if (m_builtInHeaderPaths == tmp)
return;
- m_systemHeaderPaths = tmp;
+ m_builtInHeaderPaths = tmp;
toolChainUpdated();
}
@@ -372,7 +372,7 @@ bool CustomToolChain::operator ==(const ToolChain &other) const
&& m_makeCommand == customTc->m_makeCommand
&& m_targetAbi == customTc->m_targetAbi
&& m_predefinedMacros == customTc->m_predefinedMacros
- && m_systemHeaderPaths == customTc->m_systemHeaderPaths;
+ && m_builtInHeaderPaths == customTc->m_builtInHeaderPaths;
}
Core::Id CustomToolChain::outputParserId() const
diff --git a/src/plugins/projectexplorer/customtoolchain.h b/src/plugins/projectexplorer/customtoolchain.h
index 9bf24f5694..23abb2e730 100644
--- a/src/plugins/projectexplorer/customtoolchain.h
+++ b/src/plugins/projectexplorer/customtoolchain.h
@@ -78,9 +78,9 @@ public:
const Macros &rawPredefinedMacros() const;
void setPredefinedMacros(const Macros &macros);
- SystemHeaderPathsRunner createSystemHeaderPathsRunner() const override;
- HeaderPaths systemHeaderPaths(const QStringList &cxxFlags,
- const Utils::FileName &) const override;
+ BuiltInHeaderPathsRunner createBuiltInHeaderPathsRunner() const override;
+ HeaderPaths builtInHeaderPaths(const QStringList &cxxFlags,
+ const Utils::FileName &) const override;
void addToEnvironment(Utils::Environment &env) const override;
Utils::FileNameList suggestedMkspecList() const override;
IOutputParser *outputParser() const override;
@@ -125,7 +125,7 @@ private:
Abi m_targetAbi;
Macros m_predefinedMacros;
- HeaderPaths m_systemHeaderPaths;
+ HeaderPaths m_builtInHeaderPaths;
QStringList m_cxx11Flags;
Utils::FileNameList m_mkspecs;
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp
index a97e259f10..33bc44ad19 100644
--- a/src/plugins/projectexplorer/gcctoolchain.cpp
+++ b/src/plugins/projectexplorer/gcctoolchain.cpp
@@ -139,7 +139,7 @@ static ProjectExplorer::Macros gccPredefinedMacros(const FileName &gcc,
HeaderPaths GccToolChain::gccHeaderPaths(const FileName &gcc, const QStringList &arguments,
const QStringList &env)
{
- HeaderPaths systemHeaderPaths;
+ HeaderPaths builtInHeaderPaths;
QByteArray line;
QByteArray data = runGcc(gcc, arguments, env);
QBuffer cpp(&data);
@@ -155,7 +155,7 @@ HeaderPaths GccToolChain::gccHeaderPaths(const FileName &gcc, const QStringList
while (cpp.canReadLine()) {
line = cpp.readLine();
if (line.startsWith("#include")) {
- kind = HeaderPathType::System;
+ kind = HeaderPathType::BuiltIn;
} else if (! line.isEmpty() && QChar(line.at(0)).isSpace()) {
HeaderPathType thisHeaderKind = kind;
@@ -168,7 +168,7 @@ HeaderPaths GccToolChain::gccHeaderPaths(const FileName &gcc, const QStringList
}
const QString headerPath = QFileInfo(QFile::decodeName(line)).canonicalFilePath();
- systemHeaderPaths.append({headerPath, thisHeaderKind});
+ builtInHeaderPaths.append({headerPath, thisHeaderKind});
} else if (line.startsWith("End of search list.")) {
break;
} else {
@@ -176,7 +176,7 @@ HeaderPaths GccToolChain::gccHeaderPaths(const FileName &gcc, const QStringList
}
}
}
- return systemHeaderPaths;
+ return builtInHeaderPaths;
}
void GccToolChain::toolChainUpdated()
@@ -621,7 +621,7 @@ void GccToolChain::initExtraHeaderPathsFunction(ExtraHeaderPathsFunction &&extra
m_extraHeaderPathsFunction = std::move(extraHeaderPathsFunction);
}
-ToolChain::SystemHeaderPathsRunner GccToolChain::createSystemHeaderPathsRunner() const
+ToolChain::BuiltInHeaderPathsRunner GccToolChain::createBuiltInHeaderPathsRunner() const
{
// Using a clean environment breaks ccache/distcc/etc.
Environment env = Environment::systemEnvironment();
@@ -663,10 +663,10 @@ ToolChain::SystemHeaderPathsRunner GccToolChain::createSystemHeaderPathsRunner()
};
}
-HeaderPaths GccToolChain::systemHeaderPaths(const QStringList &flags,
- const FileName &sysRoot) const
+HeaderPaths GccToolChain::builtInHeaderPaths(const QStringList &flags,
+ const FileName &sysRoot) const
{
- return createSystemHeaderPathsRunner()(flags, sysRoot.toString());
+ return createBuiltInHeaderPathsRunner()(flags, sysRoot.toString());
}
void GccToolChain::addCommandPathToEnvironment(const FileName &command, Environment &env)
diff --git a/src/plugins/projectexplorer/gcctoolchain.h b/src/plugins/projectexplorer/gcctoolchain.h
index 678b655042..3458f63414 100644
--- a/src/plugins/projectexplorer/gcctoolchain.h
+++ b/src/plugins/projectexplorer/gcctoolchain.h
@@ -146,9 +146,9 @@ public:
PredefinedMacrosRunner createPredefinedMacrosRunner() const override;
Macros predefinedMacros(const QStringList &cxxflags) const override;
- SystemHeaderPathsRunner createSystemHeaderPathsRunner() const override;
- HeaderPaths systemHeaderPaths(const QStringList &flags,
- const Utils::FileName &sysRoot) const override;
+ BuiltInHeaderPathsRunner createBuiltInHeaderPathsRunner() const override;
+ HeaderPaths builtInHeaderPaths(const QStringList &flags,
+ const Utils::FileName &sysRoot) const override;
void addToEnvironment(Utils::Environment &env) const override;
QString makeCommand(const Utils::Environment &environment) const override;
diff --git a/src/plugins/projectexplorer/headerpath.h b/src/plugins/projectexplorer/headerpath.h
index 39d668aeb8..26e10315fc 100644
--- a/src/plugins/projectexplorer/headerpath.h
+++ b/src/plugins/projectexplorer/headerpath.h
@@ -32,8 +32,9 @@ namespace ProjectExplorer {
enum class HeaderPathType {
User,
+ BuiltIn,
System,
- Framework
+ Framework,
};
class HeaderPath
diff --git a/src/plugins/projectexplorer/toolchain.h b/src/plugins/projectexplorer/toolchain.h
index 23d5dbf056..fcc7e93d06 100644
--- a/src/plugins/projectexplorer/toolchain.h
+++ b/src/plugins/projectexplorer/toolchain.h
@@ -131,11 +131,11 @@ public:
virtual PredefinedMacrosRunner createPredefinedMacrosRunner() const = 0;
virtual Macros predefinedMacros(const QStringList &cxxflags) const = 0;
- // A SystemHeaderPathsRunner is created in the ui thread and runs in another thread.
- using SystemHeaderPathsRunner = std::function<HeaderPaths(const QStringList &cxxflags,
+ // A BuiltInHeaderPathsRunner is created in the ui thread and runs in another thread.
+ using BuiltInHeaderPathsRunner = std::function<HeaderPaths(const QStringList &cxxflags,
const QString &sysRoot)>;
- virtual SystemHeaderPathsRunner createSystemHeaderPathsRunner() const = 0;
- virtual HeaderPaths systemHeaderPaths(const QStringList &cxxflags,
+ virtual BuiltInHeaderPathsRunner createBuiltInHeaderPathsRunner() const = 0;
+ virtual HeaderPaths builtInHeaderPaths(const QStringList &cxxflags,
const Utils::FileName &sysRoot) const = 0;
virtual void addToEnvironment(Utils::Environment &env) const = 0;
virtual QString makeCommand(const Utils::Environment &env) const = 0;
diff --git a/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp b/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp
index cb625b015c..409812440f 100644
--- a/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp
+++ b/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp
@@ -312,8 +312,8 @@ public:
Macros predefinedMacros(const QStringList &cxxflags) const override { Q_UNUSED(cxxflags); return Macros(); }
CompilerFlags compilerFlags(const QStringList &cxxflags) const override { Q_UNUSED(cxxflags); return NoFlags; }
WarningFlags warningFlags(const QStringList &cflags) const override { Q_UNUSED(cflags); return WarningFlags::NoWarnings; }
- SystemHeaderPathsRunner createSystemHeaderPathsRunner() const override { return SystemHeaderPathsRunner(); }
- HeaderPaths systemHeaderPaths(const QStringList &cxxflags, const FileName &sysRoot) const override
+ BuiltInHeaderPathsRunner createBuiltInHeaderPathsRunner() const override { return BuiltInHeaderPathsRunner(); }
+ HeaderPaths builtInHeaderPaths(const QStringList &cxxflags, const FileName &sysRoot) const override
{ Q_UNUSED(cxxflags); Q_UNUSED(sysRoot); return {}; }
void addToEnvironment(Environment &env) const override { Q_UNUSED(env); }
QString makeCommand(const Environment &env) const override { Q_UNUSED(env); return QString("make"); }