aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2025-02-19 11:09:19 +0100
committerChristian Stenger <christian.stenger@qt.io>2025-02-20 08:47:44 +0000
commit36bcd0876b7a26cc0030966ad2cf8a523c58f395 (patch)
tree077565cb8e38a550fbf9e4348c2068e2a345583c
parentef2402368bf2a052ea7f5a63beefbef73aed7512 (diff)
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>
-rw-r--r--src/plugins/debugger/breakhandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index dd161efd42d..a0f94e4f2ee 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -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();
}