Debugger: Fix displaying break point path

Use the internal representation of the file paths when
calculating the relative path.
Otherwise we end up in a weird full path prefixed with
../ on Windows.

Change-Id: I967f2d0e96674cb7dfa56b94bc4f1b11a63487d6
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2025-02-19 11:09:19 +01:00
parent ef2402368b
commit 36bcd0876b

View File

@@ -1019,7 +1019,7 @@ static QString trimmedFileName(const FilePath &fullPath)
const Project *project = ProjectTree::currentProject();
const FilePath projectDirectory = project ? project->projectDirectory() : FilePath();
if (projectDirectory.exists())
return FilePath::calcRelativePath(fullPath.path(), projectDirectory.toUserOutput());
return fullPath.relativePathFrom(projectDirectory).toUserOutput();
return fullPath.toUserOutput();
}