Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 7.0.0
-
None
-
-
a1b910724d (qt-creator/qt-creator/7.0) a1b910724d (qt-creator/qt-creator/master) a1b910724d (qt-creator/qt-creator/qds-3.3)
Description
In my project, renaming function-local variables doesn't work when clangd is enabled:
1. Navigate the cursor to a function-local variable name. For example, to the variable declaration.
2. Press Ctrl+Shift+R to enter the variable renaming mode.
The actual result: QtCreator opens search/replace panel within the file. The search and replace happens for the whole file and for all character sequences matching the search string, not renaming the specific variable in the given function.
Expected result (which is what happens with clangd disabled): QtCreator enters variable renaming mode. You can rename the variable in-place, and the changes are automatically applied to all instances of the variable within the current function (not any other mentions of the word anywhere else in the file).
This reproduces in my (large and not open source) CMake-based project. I could not create a small reproducer project.