aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangpchmanager
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@qt.io>2018-09-03 16:10:43 +0200
committerMarco Bubke <marco.bubke@qt.io>2018-09-10 09:31:32 +0000
commit3abaf647d0c632a4dfcb00d9ad2d1ffe66e014d9 (patch)
tree5efed90dedcb7b960cfa4d6ceb9b1aeb3e1a662b /src/plugins/clangpchmanager
parent59e734d9dae00ce2f9a00e8d197f81e7ee450b03 (diff)
Add system include path to HeaderPath and merge ProjectPartHeaderPath
System include paths are appended after other includes by the compiler. So we should set them as system includes and not as normal includes. Otherwise we change the include order. Headers in system include paths are not cluttering the screen with unwanted warning and by the way improve performance too. ProjectPartHeaderPath was a dopperganger of HeaderPath, so we merged them. Change-Id: I7c394b4098b697de79761499ffcd5913cc02d652 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/clangpchmanager')
-rw-r--r--src/plugins/clangpchmanager/projectupdater.cpp4
-rw-r--r--src/plugins/clangpchmanager/projectupdater.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/clangpchmanager/projectupdater.cpp b/src/plugins/clangpchmanager/projectupdater.cpp
index ce890ee1174..ff07f40a02d 100644
--- a/src/plugins/clangpchmanager/projectupdater.cpp
+++ b/src/plugins/clangpchmanager/projectupdater.cpp
@@ -166,11 +166,11 @@ ClangBackEnd::CompilerMacros ProjectUpdater::createCompilerMacros(const ProjectE
}
Utils::SmallStringVector ProjectUpdater::createIncludeSearchPaths(
- const CppTools::ProjectPartHeaderPaths &projectPartHeaderPaths)
+ const ProjectExplorer::HeaderPaths &projectPartHeaderPaths)
{
Utils::SmallStringVector includePaths;
- for (const CppTools::ProjectPartHeaderPath &projectPartHeaderPath : projectPartHeaderPaths) {
+ for (const ProjectExplorer::HeaderPath &projectPartHeaderPath : projectPartHeaderPaths) {
if (projectPartHeaderPath.isValid())
includePaths.emplace_back(projectPartHeaderPath.path);
}
diff --git a/src/plugins/clangpchmanager/projectupdater.h b/src/plugins/clangpchmanager/projectupdater.h
index c0040863a91..fd4ff95538f 100644
--- a/src/plugins/clangpchmanager/projectupdater.h
+++ b/src/plugins/clangpchmanager/projectupdater.h
@@ -32,6 +32,8 @@
#include <filepathcachinginterface.h>
#include <generatedfiles.h>
+#include <projectexplorer/headerpath.h>
+
namespace ProjectExplorer {
class Macro;
using Macros = QVector<Macro>;
@@ -40,8 +42,6 @@ using Macros = QVector<Macro>;
namespace CppTools {
class ProjectPart;
class ProjectFile;
-class ProjectPartHeaderPath;
-using ProjectPartHeaderPaths = QVector<ProjectPartHeaderPath>;
}
namespace ClangBackEnd {
@@ -90,7 +90,7 @@ unittest_public:
static ClangBackEnd::CompilerMacros createCompilerMacros(
const ProjectExplorer::Macros &projectMacros);
static Utils::SmallStringVector createIncludeSearchPaths(
- const CppTools::ProjectPartHeaderPaths &projectPartHeaderPaths);
+ const ProjectExplorer::HeaderPaths &projectPartHeaderPaths);
static ClangBackEnd::FilePaths createExcludedPaths(
const ClangBackEnd::V2::FileContainers &generatedFiles);