CppTools: Fix include filename cache logic

When resolution of a local include fails, a global resolution must be
done. When doing so, re-use the cache.

This will speed up the resolution for projects that mainly use the local
include directives also for global headers.

Change-Id: I7488c1977a44b881f90faa863d22f6276c20b147
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Finn Brudal
2016-03-11 15:10:28 +01:00
parent 5ee38fda5b
commit e6729c487d
2 changed files with 20 additions and 22 deletions

View File

@@ -82,7 +82,8 @@ private:
unsigned *revision) const;
bool checkFile(const QString &absoluteFilePath) const;
QString resolveFile(const QString &fileName, IncludeType type);
QString resolveFile_helper(const QString &fileName, IncludeType type);
QString resolveFile_helper(const QString &fileName,
ProjectPartHeaderPaths::Iterator headerPathsIt);
void mergeEnvironment(CPlusPlus::Document::Ptr doc);