Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
Qt Creator 4.12.1
-
None
Description
I have a CMake project, with some CMake subprojects(libraries).
Steps:
- I added a header and cpp file to the cmakelists.txt file of e.g. libraryA.
- code completion worked super, wow, amazing
- Now I decide that actually, the header and cpp file should go to another library called libraryB.
- I remove the files from the cmakelists.txt of libraryA, move the .hpp and .cpp file over to the directory of libraryB and also add them now to the files list of libraryB.
- From then on, the code completion stops working, it is like the .hpp file is totally disconnected from the .cpp file now. If I click on a member function in the header, then I will never go to the .cpp file.
What I tried that did not work:
- close all the files
- close the project and reopen
- close qtcreator and reopen
- tried "reparse externally modified files"
The thing is also that "switch header/source" still works. Also, a difference is that when you use Option+Enter on a function in the header file to generate the implementation, then it will not put the implementation on the correct spot in the .cpp file, but like somewhere in the beginning instead. And in the beginning of my coding, so before the move of the files, this put the implementation on the correct spot in the .cpp file.
So first: how can I reset the code model somehow that at least I can work again?
Second: would be great to fix this long standing bug really. I already had this since the beginning of the clang parsing, but only now I figured this out. Since only now with 4.12.1 it worked reliably in the beginning of my coding session.