Details
-
Suggestion
-
Resolution: Done
-
Not Evaluated
-
None
-
Qt Creator 1.3.85 (2.0.0-rc1)
-
None
-
Ubuntu 10.04
Description
If a class is used only by a pointer to a class, in header can be used forward declaration.
However, it is not very informative to see only this in "Follow under cursor". The best behavior is to point to this forward declaration by "F2", and but some other key, point to the full class definition.
Of course, if there is more than one class definition in one project, some error should be reported. But I don't think it is a normal case.
Example of code:
a.h:
#ifndef A_H #define A_H class B; class A { B* pointer; }; #endif // A_H
b.h:
#ifndef B_H #define B_H class B { unsigned int member; }; #endif // B_H