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:
		@@ -86,7 +86,7 @@ void RawProjectPart::setMacros(const ProjectExplorer::Macros ¯os)
 | 
			
		||||
    this->projectMacros = macros;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void RawProjectPart::setHeaderPaths(const ProjectPartHeaderPaths &headerPaths)
 | 
			
		||||
void RawProjectPart::setHeaderPaths(const ProjectExplorer::HeaderPaths &headerPaths)
 | 
			
		||||
{
 | 
			
		||||
    this->headerPaths = headerPaths;
 | 
			
		||||
}
 | 
			
		||||
@@ -96,7 +96,7 @@ void RawProjectPart::setIncludePaths(const QStringList &includePaths)
 | 
			
		||||
    headerPaths.clear();
 | 
			
		||||
 | 
			
		||||
    foreach (const QString &includeFile, includePaths) {
 | 
			
		||||
        ProjectPartHeaderPath hp(includeFile, ProjectPartHeaderPath::IncludePath);
 | 
			
		||||
        ProjectExplorer::HeaderPath hp(includeFile, ProjectExplorer::IncludePathType::User);
 | 
			
		||||
 | 
			
		||||
        // The simple project managers are utterly ignorant of frameworks on macOS, and won't report
 | 
			
		||||
        // framework paths. The work-around is to check if the include path ends in ".framework",
 | 
			
		||||
@@ -104,12 +104,11 @@ void RawProjectPart::setIncludePaths(const QStringList &includePaths)
 | 
			
		||||
        if (includeFile.endsWith(QLatin1String(".framework"))) {
 | 
			
		||||
            const int slashIdx = includeFile.lastIndexOf(QLatin1Char('/'));
 | 
			
		||||
            if (slashIdx != -1) {
 | 
			
		||||
                hp = ProjectPartHeaderPath(includeFile.left(slashIdx),
 | 
			
		||||
                                             ProjectPartHeaderPath::FrameworkPath);
 | 
			
		||||
                hp = {includeFile.left(slashIdx), ProjectExplorer::IncludePathType::Framework};
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        headerPaths += hp;
 | 
			
		||||
        headerPaths.push_back(std::move(hp));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user