Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 6.0.2
-
None
-
-
59fb0e9c9c (qt-creator/qt-creator/7.0) 59fb0e9c9c (qt-creator/qt-creator/master) 59fb0e9c9c (qt-creator/tqtc-qt-creator/7.0) 59fb0e9c9c (qt-creator/tqtc-qt-creator/master) 59fb0e9c9c (qt-creator/tqtc-qt-creator/qds-3.1)
Description
Suppose we have project and subproject with this file structure
D:\project\config.pri D:\project\project.pro D:\project\subproject\subproject.pro
And subproject.pro contains relative include
include(../config.pri)
or
include($$PWD/../config.pri)
Opening subproject in one of this ways works well
qtcreator D:\project\subproject\subproject.pro qtcreator D:/project/subproject/subproject.pro qtcreator -client D:/project/subproject/subproject.pro cd D:\project\subproject && qtcreator -client subproject.pro
Everything works and looks nice
However when you try to open like this
qtcreator -client D:\project\subproject\subproject.pro
QtCreator shows fullpath instead of basename and doesn't show include since it cannot locate it
and cannot build project due to "missing" config.pri (error shows that path to include computed incorrectly)
Debug output shows that QmakeProject() constructor recieves path with native separators but expects unix separators because Utils::FilePath relies on that. I cannot track full path it makes before ending up unclean only in later case, but I can suggest fixing it somewhere along the way, for example in ProjectExplorerPlugin::extensionsInitialized (patch in attachement) or in ProjectExplorerPlugin::openProject or in ProjectExplorerPlugin::openProjects