Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 4.10.0-beta1
-
None
-
-
e6bda58033befaa0d013a826637e8e966410a5b5 (qt-creator/qt-creator/master)
Description
The recently landed change to have the Compilation Database plugin parse --sysroot (thanks!) doesn't seem to handle relative paths. The following was sufficient to fix the problem for me:
diff --git a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseutils.cpp b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseutils.cpp index ff931cc387..9a9411ee46 100644 --- a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseutils.cpp +++ b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseutils.cpp @@ -185,7 +185,7 @@ void filteredFlags(const QString &fileName, if (flag.startsWith("--sysroot=")) { if (sysRoot.isEmpty()) - sysRoot = flag.mid(10); + sysRoot = updatedPathFlag(flag.mid(10), workingDir); continue; }
Thanks again!