forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user