forked from qt-creator/qt-creator
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user