Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
Qt Creator 4.12.3
-
None
Description
In brief, when I ctrl+left-click on a function declaration, it jumps to function definition in a wrong file with same base name, class name and function name, whereas the jump target file is out of current project.
My project have this kind of directory layout:
- root
- ProductA
- CMakeLists.txt
- foo.h
- foo.cpp
- ProductB
- CMakeLists.txt
- foo.h
- foo.cpp
- ProductA
Files "foo.h" and "foo.cpp" in both project have function with same signature.
If I have open history for both projects, then "Follow symbol under cursor" in a function declaration in ProductB's foo.h, it will jump to ProductA's foo.cpp.
I also tried rename ProductA folder to something else, then re-run cmake for ProductB. Interestingly it sticks to jump to nonexisting ProductA's foo.cpp and failed.
It seems the code model is keeping a global cache somewhere, but indexing symbols only using source file's base name?
Attachments
Issue Links
- duplicates
-
QTCREATORBUG-23783 Follow symbol under cursor mismatch functions in different subprojects
- Closed