forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -58,7 +58,7 @@ namespace {
|
||||
class ParseParams
|
||||
{
|
||||
public:
|
||||
ProjectPartHeaderPaths headerPaths;
|
||||
ProjectExplorer::HeaderPaths headerPaths;
|
||||
WorkingCopy workingCopy;
|
||||
QSet<QString> sourceFiles;
|
||||
int indexerFileSizeLimitInMb = -1;
|
||||
@@ -203,7 +203,7 @@ void index(QFutureInterface<void> &indexingFuture,
|
||||
bool processingHeaders = false;
|
||||
|
||||
CppModelManager *cmm = CppModelManager::instance();
|
||||
const ProjectPartHeaderPaths fallbackHeaderPaths = cmm->headerPaths();
|
||||
const ProjectExplorer::HeaderPaths fallbackHeaderPaths = cmm->headerPaths();
|
||||
const CPlusPlus::LanguageFeatures defaultFeatures =
|
||||
CPlusPlus::LanguageFeatures::defaultFeatures();
|
||||
for (int i = 0; i < files.size(); ++i) {
|
||||
@@ -226,7 +226,7 @@ void index(QFutureInterface<void> &indexingFuture,
|
||||
processingHeaders = true;
|
||||
}
|
||||
|
||||
ProjectPartHeaderPaths headerPaths = parts.isEmpty()
|
||||
ProjectExplorer::HeaderPaths headerPaths = parts.isEmpty()
|
||||
? fallbackHeaderPaths
|
||||
: parts.first()->headerPaths;
|
||||
sourceProcessor->setHeaderPaths(headerPaths);
|
||||
|
||||
Reference in New Issue
Block a user