Keep the locator database in sync with the current snapshot.

Thanks to this patch we can move the filtering of C++ symbols
in a background thread.

Done-with: Erik Verbruggen
This commit is contained in:
Roberto Raggi
2010-09-06 16:46:23 +02:00
parent 6863b02e03
commit 86799309aa
6 changed files with 33 additions and 34 deletions

View File

@@ -375,6 +375,9 @@ struct CanonicalSymbol
};
int numberOfClosedEditors = 0;
} // end of anonymous namespace
CPPEditorEditable::CPPEditorEditable(CPPEditor *editor)
@@ -428,6 +431,12 @@ CPPEditor::~CPPEditor()
m_semanticHighlighter->abort();
m_semanticHighlighter->wait();
++numberOfClosedEditors;
if (numberOfClosedEditors == 5) {
m_modelManager->GC();
numberOfClosedEditors = 0;
}
}
TextEditor::BaseTextEditorEditable *CPPEditor::createEditableInterface()