forked from qt-creator/qt-creator
CppTools: Provide the editor snapshot for SemanticInfoUpdater
...so that SemanticInfoUpdater does not depend anymore on the EditorDocumentParser. Accessing the snapshot was a blocking operation that delayed the semantic info update longer than actually needed. Change-Id: I348d22ef83ab310d4319b2e8b9678fe90ee24d6a Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -42,6 +42,7 @@ BuiltinEditorDocumentParser::BuiltinEditorDocumentParser(const QString &filePath
|
||||
, m_forceSnapshotInvalidation(false)
|
||||
, m_releaseSourceAndAST(true)
|
||||
{
|
||||
qRegisterMetaType<CPlusPlus::Snapshot>("CPlusPlus::Snapshot");
|
||||
}
|
||||
|
||||
void BuiltinEditorDocumentParser::update(WorkingCopy workingCopy)
|
||||
@@ -187,6 +188,8 @@ void BuiltinEditorDocumentParser::update(WorkingCopy workingCopy)
|
||||
}
|
||||
m_snapshot = newSnapshot;
|
||||
m_deps.build(m_snapshot);
|
||||
|
||||
emit finished(document(), m_snapshot);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user