[QtCreator] strange reaction with switch header/soource
-
Hi,
Currently, when I'm click on "switch header/source file" or "switch function definition/declaration" I observes a strange thing. Switching is performed well. But when I want to go back to the previous file, QtCreator cancles my operation.To be more explicit, supposes that I'm currently displaying the .cpp file. I perform a switch. So .h is now displayed. But if I try to go back to the .cpp file, QtCreator cancels my operation and displays again the .h file.
Has anyone observed the same problem?
I'm currently using QtCreator 8.0.1 under Windows10.
-
Qt Creator 8 moved the header / source switching to clangd, which has two ways of working:
- looks on disk after the corresponding files
- takes symbols into consideration and does a heuristic switch
The second point makes it possible for clangd to find a header even if it doesn't exist. See https://github.com/clangd/clangd/issues/1225
There is a bug report for this issue: QTCREATORBUG-28183
On "Switch Header/Source", it switches and switches back. I don't know if you commented there / upvoted.