forked from qt-creator/qt-creator
Delay the parsing of the document.
This commit is contained in:
@@ -288,6 +288,7 @@ static void semanticSearch_helper(QFutureInterface<Core::Utils::FileSearchResult
|
||||
}
|
||||
|
||||
Document::Ptr newDoc = snapshot.documentFromSource(source, fileName);
|
||||
newDoc->parse();
|
||||
|
||||
if (SemanticSearch *search = factory->create(future, newDoc, snapshot)) {
|
||||
search->setSource(source);
|
||||
|
||||
@@ -412,6 +412,8 @@ void CppEditorSupport::checkDocumentNow()
|
||||
const QByteArray preprocessedCode = snapshot.preprocessedCode(plainText, fileName);
|
||||
|
||||
if (Document::Ptr doc = snapshot.documentFromSource(preprocessedCode, fileName)) {
|
||||
doc->parse();
|
||||
|
||||
CheckDocument checkDocument(doc, snapshot);
|
||||
QList<QuickFixOperationPtr> quickFixes = checkDocument(ed->textCursor());
|
||||
if (! quickFixes.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user