diff options
author | Marco Bubke <marco.bubke@qt.io> | 2018-08-14 13:07:04 +0200 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2018-08-14 15:03:51 +0000 |
commit | 7bae47642c3af7316ffe816bbf7a092b7f536c1e (patch) | |
tree | 5e1aad4cea4dec5837e3b6413a995a934d3a13e0 /src/plugins/clangrefactoring | |
parent | b592339b4d1741319b52144e23d255fa59ef0b63 (diff) | |
download | qt-creator-7bae47642c3af7316ffe816bbf7a092b7f536c1e.tar.gz |
Add optional system include to compiler option builder
System includes suppress warnings and prevent indexing of unwanted symbols.
Using system includes for all includes outside of the project can be
quite advantageous. The rootProjectDirectory() can be extended to be set
in the project settings. An automatic generation could be possible but
could create an unwanted path which includes files outside of the
perceived project.
Change-Id: Ib9d3158f14f41efe1f6657f962d5c4437bb324b2
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Diffstat (limited to 'src/plugins/clangrefactoring')
-rw-r--r-- | src/plugins/clangrefactoring/clangqueryprojectsfindfilter.cpp | 2 | ||||
-rw-r--r-- | src/plugins/clangrefactoring/refactoringengine.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/clangrefactoring/clangqueryprojectsfindfilter.cpp b/src/plugins/clangrefactoring/clangqueryprojectsfindfilter.cpp index 336a681ab2..77d4a9ef6e 100644 --- a/src/plugins/clangrefactoring/clangqueryprojectsfindfilter.cpp +++ b/src/plugins/clangrefactoring/clangqueryprojectsfindfilter.cpp @@ -153,7 +153,7 @@ Utils::SmallStringVector ClangQueryProjectsFindFilter::compilerArguments(CppTool { using CppTools::CompilerOptionsBuilder; - CompilerOptionsBuilder builder(*projectPart); + CompilerOptionsBuilder builder(*projectPart, CppTools::UseSystemHeader::Yes); return Utils::SmallStringVector(builder.build(fileKind, CompilerOptionsBuilder::PchUsage::None)); diff --git a/src/plugins/clangrefactoring/refactoringengine.cpp b/src/plugins/clangrefactoring/refactoringengine.cpp index b5127e2b88..57122fd3be 100644 --- a/src/plugins/clangrefactoring/refactoringengine.cpp +++ b/src/plugins/clangrefactoring/refactoringengine.cpp @@ -74,7 +74,7 @@ void RefactoringEngine::startLocalRenaming(const CppTools::CursorInEditor &data, QString filePath = data.filePath().toString(); QTextCursor textCursor = data.cursor(); - CompilerOptionsBuilder optionsBuilder{*projectPart}; + CompilerOptionsBuilder optionsBuilder{*projectPart, CppTools::UseSystemHeader::Yes}; Utils::SmallStringVector commandLine{optionsBuilder.build( fileKindInProjectPart(projectPart, filePath), CppTools::getPchUsage())}; |