From 36bcd0876b7a26cc0030966ad2cf8a523c58f395 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 19 Feb 2025 11:09:19 +0100 Subject: [PATCH] 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 Reviewed-by: hjk --- src/plugins/debugger/breakhandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); }