Details
-
Bug
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
Qt Creator 13.0.0
-
None
-
macOS 13.6.6, Qt Creator 13.0.0
Description
Consider a Qt project with a pro file containing the following:
SOURCES += main.cpp
HEADERS += funcs.h
win32: SOURCES += funcs_win.cpp
macx: SOURCES += funcs_mac.cpp
The contents of funcs_win.cpp and funcs_mac.cpp are both:
void someFunction() {
// platform specific code here
}
The contents of funcs.h is:
void someFunction();
And the contents of main.cpp is:
#include "funcs.h"
int main(int argc, char *argv[]) {
someFunction();
return 0;
}
(Forgive the formatting – I can't figure out how to include formatting code in the bug reporter text editor!)
If I open this project in Qt Creator, right click someFunction() in main.cpp, and pick "Follow symbol under cursor", in macOS it will consistently go to the someFunction() implementation in funcs_win.cpp instead of funcs_mac.cpp.
Granted there is an ambiguity as to which implementation it could be in general, but that ambiguity should be resolved by using the current platform.