Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt Creator 7.0.2, Qt Creator 8.0.0-beta1, Qt Creator 8.0.0-beta2, Qt Creator 8.0.0-rc1, Qt Creator 8.0.0
Description
Given a function prototype of:
void foo(bool);
in some header file, and an implementation of that function in a source file that looks like this:
void foo(const bool) { }
Creator does not recognize the implementation of the function. Placing the cursor on it does not highlight it, and when using the "find references to symbol under cursor" functionality, no matches are found.
Removing the const makes Creator recognize it, but that obviously is not an acceptable workaround. Omitting top-level const in prototypes is a very common practice. It's of no interest whatsoever to the caller and would just pollute the header files, especially with code that tries to be as const-correct as possible.