[Qt-creator] doesn't see inline function definitions in .hpp files

Gene Smith gds at chartertn.net
Fri Dec 12 07:20:19 CET 2014


I have just been using qt-creator to just browse a non-qt embedded c++ 
project. It seemed to be working fine until I tried to right click on a 
function that is inline it would only take me to the .h file where the 
function is declared and not to the .hpp file where it is defined. In 
this project all inline functions are defined in .hpp files and the .hpp 
is #included'd outside the class near the end of the corresponding .h 
file. (.hpp's are never directly included in .cpp files).

Also, if I go to any inline function definition in any .hpp, qt-creator 
does not seems to recognize anything in the .hpp file (does not draw a 
faint box around the name which seems to indicates a link).

I see this in version 3.2.2 on linux and 3.2.1 on windows. I can't find 
any mention of this in qt-creator google searches, this mailing list or 
the bug reports. So either I have done something wrong importing the 
project or usage of .hpp containing inline definitions in this project 
is not typical or ...???

Just to be clear, the .hpp's show up in the project tree OK. Also, where 
the .hpp is included in the .h is like this:

:
:
};  // end if class declaration

#if (defined(FOO))
	#include "alternate.hpp"
#else
	#include "real.hpp"
#endif

where "FOO" is not defined or known to qt-creator and "alternate.hpp" is 
not in the project but "real.hpp" is and contains the inline function 
definitions.


-gene




More information about the Qt-creator mailing list