diff options
author | Christian Kandeler <[email protected]> | 2023-04-03 14:12:39 +0200 |
---|---|---|
committer | Christian Kandeler <[email protected]> | 2023-04-04 07:26:49 +0000 |
commit | 03195429374af53bf90ed48e9b9c6e2d4df9a7b3 (patch) | |
tree | aed905c3b5ad822e370dfe9550094d0f8695d0c0 /src/plugins/clangcodemodel/test | |
parent | 6ad3531b15c960a367470af1c249e3029d1b53b5 (diff) |
ClangCodeModel: Do not try to rename macros and namespaces with clangd
Unfortunately, clangd refuses to rename macros and namespaces.
Fall back to our old two-stage "find + replace" approach for macros
(which clangd can find just fine) and employ the built-in code model for
namespaces (as they don't get indexed at all by clangd).
Change-Id: I08b1088ff4de9220427e089ef0700dbf2a944081
Reviewed-by: Christian Stenger <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: <[email protected]>
Diffstat (limited to 'src/plugins/clangcodemodel/test')
-rw-r--r-- | src/plugins/clangcodemodel/test/clangdtests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/clangcodemodel/test/clangdtests.cpp b/src/plugins/clangcodemodel/test/clangdtests.cpp index b5103d3552d..c60a45f1df2 100644 --- a/src/plugins/clangcodemodel/test/clangdtests.cpp +++ b/src/plugins/clangcodemodel/test/clangdtests.cpp @@ -294,7 +294,7 @@ void ClangdTestFindReferences::test() QVERIFY(doc); QTextCursor cursor(doc->document()); cursor.setPosition(pos); - client()->findUsages(doc, cursor, {}, {}); + client()->findUsages(CppEditor::CursorInEditor(cursor, doc->filePath(), nullptr, doc), {}, {}); QVERIFY(waitForSignalOrTimeout(client(), &ClangdClient::findUsagesDone, timeOutInMs())); QCOMPARE(m_actualResults.size(), expectedResults.size()); |