From 5e4fe5260b55fdefc3ea3af87f2fd1e0fd10bd82 Mon Sep 17 00:00:00 2001 From: Christian Kamm <christian.d.kamm@nokia.com> Date: Tue, 19 Oct 2010 11:50:57 +0200 Subject: [PATCH] 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 --- src/plugins/qmljseditor/qmljseditor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/qmljseditor/qmljseditor.cpp b/src/plugins/qmljseditor/qmljseditor.cpp index 39ec9976de1..0df9bed728a 100644 --- a/src/plugins/qmljseditor/qmljseditor.cpp +++ b/src/plugins/qmljseditor/qmljseditor.cpp @@ -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; -- GitLab