ClangCodeModel: Implement global renaming via clangd

Note that we do not use the LSP rename functionality. We do "manual"
renaming the same way as in the built-in code model, but based on the
references found by clangd.

Change-Id: Ifa5597efe5c89c8f9204a4f5323bc755544696cf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-05-18 12:59:15 +02:00
parent 78274956d0
commit 12fd21a880
9 changed files with 186 additions and 77 deletions

View File

@@ -44,8 +44,8 @@ public:
void startLocalRenaming(const CppTools::CursorInEditor &data,
CppTools::ProjectPart *projectPart,
RenameCallback &&renameSymbolsCallback) override;
void globalRename(const CppTools::CursorInEditor &, CppTools::UsagesCallback &&,
const QString &) override {}
void globalRename(const CppTools::CursorInEditor &cursor, CppTools::UsagesCallback &&callback,
const QString &replacement) override;
void findUsages(const CppTools::CursorInEditor &cursor,
CppTools::UsagesCallback &&callback) const override;
void globalFollowSymbol(const CppTools::CursorInEditor &,