-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 2.2.0
-
None
foo.h is a header located in my project, but also installed in a standard include path
such as /usr/local/include
If I include foo.h in a source file and I hover the #include line the tooltip is "/usr/local/include/foo.h" instead of "/path/to/my/project/foo.h".
It seems that in src/plugins/cmakeprojectmanager/cmakeproject.cpp around line 290, system header
paths are added before project header paths to the header paths list. Doing it in the other order
seems to do the trick.
However there is another problem, the above fix works when there is only one project opened. When multiple project
are opened, Qt Creator c++ parser gets all header paths from all projects, and remove the duplicates. The include paths
list is then like this for example : "/path/to/project1","/path/to/project1/include","/usr/local/include",[other system header paths...],"/path/to/project2".
This is wrong because in that case system header paths are searched before project2 header paths.
I guess projects header paths should be separated from system header paths. There is a m_systemIncludePaths data member in CppPreprocessor class, but nothing
is added to it.
- replaces
-
QTCREATORBUG-11744 QtCreator does not reflect include order of compiler
-
- Closed
-