Utils: Rename FilePath::relativePath() to relativePathFrom()

Hopefully less confusion about the direction.

Change-Id: I61727d6c4d19e0dfe46f24ff24f5d90f9835d05c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2022-10-18 14:38:29 +02:00
parent 54f7ebf001
commit 4266f612e6
10 changed files with 15 additions and 15 deletions

View File

@@ -67,7 +67,7 @@ static void copySourcePathsToClipboard(const FilePaths &srcPaths, const ProjectN
QClipboard *clip = QGuiApplication::clipboard();
QString data = Utils::transform(srcPaths, [projDir = node->filePath()](const FilePath &path) {
return path.relativePath(projDir).cleanPath().toString();
return path.relativePathFrom(projDir).cleanPath().toString();
}).join(" ");
clip->setText(data);
}
@@ -301,7 +301,7 @@ FilePaths CMakeBuildSystem::filesGeneratedFrom(const FilePath &sourceFile) const
baseDirectory = baseDirectory.parentDir();
}
const FilePath relativePath = baseDirectory.relativePath(project);
const FilePath relativePath = baseDirectory.relativePathFrom(project);
FilePath generatedFilePath = buildConfiguration()->buildDirectory().resolvePath(relativePath);
if (sourceFile.suffix() == "ui") {