forked from qt-creator/qt-creator
ClangCodeModel: Add experimental clangd support
If the user has enabled clangd (default is off), we start up one instance per project when it is opened/changed (including build config switches), and trigger background indexing. So far, the index is used to provide results for locators and "Find Usages". Per-document functionality such as semantic highlighting and completion is still provided by libclang. Change-Id: I12532fca1b9c6278baab560e7238cba6189cde9f Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -472,7 +472,8 @@ void CppEditorWidget::findUsages()
|
||||
void CppEditorWidget::findUsages(QTextCursor cursor)
|
||||
{
|
||||
// 'this' in cursorInEditor is never used (and must never be used) asynchronously.
|
||||
const CppTools::CursorInEditor cursorInEditor{cursor, textDocument()->filePath(), this};
|
||||
const CppTools::CursorInEditor cursorInEditor{cursor, textDocument()->filePath(), this,
|
||||
textDocument()};
|
||||
QPointer<CppEditorWidget> cppEditorWidget = this;
|
||||
d->m_modelManager->findUsages(cursorInEditor,
|
||||
[=](const CppTools::Usages &usages) {
|
||||
|
||||
Reference in New Issue
Block a user