[SOLVED] How to jump from function declaration to function definition.
-
On the same note, I am including a header file #include "quickfix/SocketInitiator.h"
and linking a library libquickfix.so that contains classes declared in SocketInitiator.h.
Also, I have all the source code for the library including SocketInitiator.cpp.
How would I be able to step into SocketInitiator.cpp while debugging?
Thanks!
-
Just jump into the header and then hit F4 to go to the cpp file. Once it is loaded it is available via F2 as well.
The reasoning is that we only want to parse the code that is used in your project: That is your sources and the headers those use. Parsing random .cpp files that happen to be located next to the headers you use will only slow down the parsing as well as the completion itself and does blow up memory usage, too.
-
[quote author="Tobias Hunger" date="1309415289"]Parsing random .cpp files that happen to be located next to the headers you use will only slow down the parsing as well as the completion itself and does blow up memory usage, too.[/quote]
Sounds reasonable.
But what do people use then to dive into the Qt sources? I find it really cumbersome to comb through most of the sources just to find the implementation of a specific Qt function.
Is it possible to instruct QtCreator to index a specific directory which is not in the project?
I think I generally would like the idea of having "static indices", which can be generated at build time and then serve as an index to QtCreator.
-
I just do the F2/F4 combo most of the time.
If I really care about Qt stuff, then I just open Qt as a project:-)
-
I do not quite understand the purpose of F4. I think F2 would be enough if it could load a file and jump into function (and etc.) definition as F4 does. Once header and cpp are loaded F2, F4, and Shift-F2 have the same functionality - sort of excessive.
-
I usually use F4, but I also ctrl+click on the method to jump form definition to source and back.