I have the same project on two different folders, each of them in a different git branch. This way I can refactor one branch in the other branch. The issue is, KDevelop fails to understand files from different folders, but same name, are different, so, when telling KDevelop to 'Jump to', even on a method in the same file, it opens the same file, but from the other project, so I end up modifying both branches, while the idea was to have one of them untouched.
Forgot to add that I have both projects open in the same session of KDevelop
Yes, a similar problem occurs when you have headers of a project installed which is also open in KDevelop. It will sometimes go to the installed headers, sometimes to the local files. I'm not sure what to do about it, maybe prefer symbols from the same project?
It seems like the solution to me
> I'm not sure what to do about it, maybe prefer symbols from the same project? That sounds like a good idea to me.
Also had two branches checked out in different dirs and both open in the same session. And KDevelop jumped to the source code in the second project from the first one when using "Jump to declaration" or "Jump to definition". Even after I unloaded the second project. And even after I then restarted KDevelop. And after I removed ~/.cache/kdevduchain (and restarted KDevelop once again). How is that possible?
I think the actual bug is explained above. To explain your particular behavior, you probably still have some files open from the old project. Then the parser kicks in on those and you get the wrong symbols. Try "close all", close KDevelop, remove cache and restart.
Thank you, it turned out I had one crashed KDevelop instance in the KDE bug handler.