aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangcodemodel/clangutils.cpp
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@qt.io>2018-08-14 13:07:04 +0200
committerMarco Bubke <marco.bubke@qt.io>2018-08-14 15:03:51 +0000
commit7bae47642c3af7316ffe816bbf7a092b7f536c1e (patch)
tree5e1aad4cea4dec5837e3b6413a995a934d3a13e0 /src/plugins/clangcodemodel/clangutils.cpp
parentb592339b4d1741319b52144e23d255fa59ef0b63 (diff)
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/clangcodemodel/clangutils.cpp')
-rw-r--r--src/plugins/clangcodemodel/clangutils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/clangcodemodel/clangutils.cpp b/src/plugins/clangcodemodel/clangutils.cpp
index b58304eb2b..8f11758ac4 100644
--- a/src/plugins/clangcodemodel/clangutils.cpp
+++ b/src/plugins/clangcodemodel/clangutils.cpp
@@ -153,9 +153,9 @@ private:
if (m_projectPart.qtVersion != CppTools::ProjectPart::NoQt) {
const QString wrappedQtCoreHeaderPath = wrappedQtHeadersPath + "/QtCore";
- add(includeDirOption());
+ add(includeDirOptionForPath(wrappedQtHeadersPath));
add(QDir::toNativeSeparators(wrappedQtHeadersPath));
- add(includeDirOption());
+ add(includeDirOptionForPath(wrappedQtHeadersPath));
add(QDir::toNativeSeparators(wrappedQtCoreHeaderPath));
}
}
@@ -164,7 +164,7 @@ private:
{
const QString path = ModelManagerSupportClang::instance()->dummyUiHeaderOnDiskDirPath();
if (!path.isEmpty()) {
- add(includeDirOption());
+ add("-I");
add(QDir::toNativeSeparators(path));
}
}