QmlJS: Fix newly parsed document not being added to the snapshot copy.

This was the root cause of several issues with scoping and import
resolution. For instance, finding the components that instantiate a
component that's opened in the editor failed; leading to code
completion missing valid entries.

Reviewed-by: Erik Verbruggen
Reviewed-by: Roberto Raggi
This commit is contained in:
Christian Kamm
2010-10-19 11:50:57 +02:00
parent 8862af3a71
commit 5e4fe5260b

View File

@@ -2006,6 +2006,7 @@ SemanticInfo SemanticHighlighter::semanticInfo(const Source &source)
doc = snapshot.documentFromSource(source.code, source.fileName);
doc->setEditorRevision(source.revision);
doc->parse();
snapshot.insert(doc);
}
SemanticInfo semanticInfo;