QmlProjectManager: Avoid one use of FilePath::calcRelativePath()

... and two of FilePath::toUrlishString().

Change-Id: I4bda0fc7a18ed62c71726c5c5f08dbb643bfa03c
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
This commit is contained in:
hjk
2025-03-06 15:48:30 +01:00
committed by Knud Dollereder
parent 68ad02560f
commit 4ecfb3744a

View File

@@ -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