From 4ecfb3744a0871871106c03a8569081f1697f479 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 6 Mar 2025 15:48:30 +0100 Subject: [PATCH] QmlProjectManager: Avoid one use of FilePath::calcRelativePath() ... and two of FilePath::toUrlishString(). Change-Id: I4bda0fc7a18ed62c71726c5c5f08dbb643bfa03c Reviewed-by: Knud Dollereder --- .../qmlprojectmanager/qmlprojectexporter/cmakewriter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/qmlprojectmanager/qmlprojectexporter/cmakewriter.cpp b/src/plugins/qmlprojectmanager/qmlprojectexporter/cmakewriter.cpp index 9385e40dd99..c6e6fc2e3ee 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectexporter/cmakewriter.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectexporter/cmakewriter.cpp @@ -231,8 +231,7 @@ QString CMakeWriter::makeFindPackageBlock(const NodePtr &node, const QmlBuildSys QString CMakeWriter::makeRelative(const NodePtr &node, const Utils::FilePath &path) const { - const QString dir = node->dir.toUrlishString(); - return "\"" + Utils::FilePath::calcRelativePath(path.toUrlishString(), dir) + "\""; + return "\"" + path.relativePathFromDir(node->dir).path() + "\""; } QString CMakeWriter::makeQmlFilesBlock(const NodePtr &node) const