I have c++ project in visual studio, which in only ONE class IntelliSense is not able to resolve a couple of declared methods in the header file. So when I try to click "go to definition" IntelliSense does not open the source file, because he cannot find the definition of the method.
I tried already adding a cpp.hint
file, with declaring macros used in these methods. In other classes this helped to solve the problem, but not for this class. I also deleted every time the ipch
folder and the *.db
file.
I already found out, that IntelliSense is able to resolve the first method declared after a public/protected/private specifier:
So switching the order helps IntelliSense to find it ...
One BAD solution would be to add the public/protected/private specifier for every method, but you can imagine, that I don't want to do that. I am also working with Qt5, but I don't think this is the problem here. I also don't think that the problem relies in the code of the definitions, because it doesn't matter, which method stands first after the specifier.
Did someone already stumbled accross this kind of problem and knows how to solve it?
Thanks for all your sugesstions.
EDIT: It is definitly a Qt problem, when I comment out the Q_OBJECT
definition in the class, IntelliSense can find all methods. Unfortunately, I can't compile my code without it.