forked from qt-creator/qt-creator
C++: Record also unresolved paths for includes
Change-Id: Id107b6c1f34f594c5a01502c156963c964235ed7 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
committed by
Erik Verbruggen
parent
35a790fb63
commit
e3bc84c414
@@ -331,7 +331,7 @@ void CppPreprocessor::mergeEnvironment(Document::Ptr doc)
|
||||
m_processed.insert(fn);
|
||||
|
||||
foreach (const Document::Include &incl, doc->includes()) {
|
||||
QString includedFile = incl.fileName();
|
||||
QString includedFile = incl.resolvedFileName();
|
||||
|
||||
if (Document::Ptr includedDoc = m_snapshot.document(includedFile))
|
||||
mergeEnvironment(includedDoc);
|
||||
@@ -364,7 +364,7 @@ void CppPreprocessor::sourceNeeded(unsigned line, const QString &fileName, Inclu
|
||||
QString absoluteFileName = resolveFile(fileName, type);
|
||||
absoluteFileName = QDir::cleanPath(absoluteFileName);
|
||||
if (m_currentDoc && !absoluteFileName.isEmpty())
|
||||
m_currentDoc->addIncludeFile(absoluteFileName, line);
|
||||
m_currentDoc->addIncludeFile(Document::Include(fileName, absoluteFileName, line, type));
|
||||
if (m_included.contains(absoluteFileName))
|
||||
return; // we've already seen this file.
|
||||
if (absoluteFileName != modelManager()->configurationFileName())
|
||||
|
||||
Reference in New Issue
Block a user