summaryrefslogtreecommitdiff
path: root/src/plugins/compilationdatabaseprojectmanager
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-04-22 17:25:41 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2020-04-23 08:45:59 +0000
commit2e4ed0696ba3aba95d189c7de80853c8a1f53aca (patch)
treed0a4bf6138c31ab8ea30b205511920d7149ba491 /src/plugins/compilationdatabaseprojectmanager
parent7bf3024a566cd27ada873877cfe50f110736296f (diff)
downloadqt-creator-2e4ed0696ba3aba95d189c7de80853c8a1f53aca.tar.gz
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>
Diffstat (limited to 'src/plugins/compilationdatabaseprojectmanager')
-rw-r--r--src/plugins/compilationdatabaseprojectmanager/compilationdbparser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/compilationdatabaseprojectmanager/compilationdbparser.cpp b/src/plugins/compilationdatabaseprojectmanager/compilationdbparser.cpp
index 1505dffa1a..7b498ab957 100644
--- a/src/plugins/compilationdatabaseprojectmanager/compilationdbparser.cpp
+++ b/src/plugins/compilationdatabaseprojectmanager/compilationdbparser.cpp
@@ -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;
}