Use the text editor revision to ignore outdated parse results.

This commit is contained in:
Roberto Raggi
2009-12-15 15:52:55 +01:00
parent aa8a670669
commit 51de95c497
9 changed files with 78 additions and 34 deletions

View File

@@ -84,6 +84,16 @@ QString CppEditorSupport::contents()
return _cachedContents;
}
unsigned CppEditorSupport::editorRevision() const
{
if (_textEditor) {
if (TextEditor::BaseTextEditor *ed = qobject_cast<TextEditor::BaseTextEditor *>(_textEditor->widget()))
return ed->document()->revision();
}
return 0;
}
int CppEditorSupport::updateDocumentInterval() const
{ return _updateDocumentInterval; }