CompilationDbProjectManager: Do not canonicalize file paths

In particular, we do not want to follow symbolic links, but see the file
names as they appear in the project file.

Fixes: QTCREATORBUG-23511
Change-Id: Ibf83ac143933fa0c9568dd4e3c0be825d8ba8f0b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Kandeler
2020-04-22 17:25:41 +02:00
parent 7bf3024a56
commit 2e4ed0696b

View File

@@ -170,7 +170,7 @@ static FilePath jsonObjectFilename(const QJsonObject &object)
const QString workingDir = QDir::fromNativeSeparators(object["directory"].toString());
FilePath fileName = FilePath::fromString(QDir::fromNativeSeparators(object["file"].toString()));
if (fileName.toFileInfo().isRelative())
fileName = FilePath::fromString(workingDir + "/" + fileName.toString()).canonicalPath();
fileName = FilePath::fromString(QDir::cleanPath(workingDir + "/" + fileName.toString()));
return fileName;
}