From b001e54599679d0bbb03f28564f446f88d6b19a9 Mon Sep 17 00:00:00 2001
From: Orgad Shaneh <orgad.shaneh@audiocodes.com>
Date: Mon, 2 Feb 2015 10:50:48 +0200
Subject: [PATCH] Valgrind: Do not use native separators at all

Since valgrind only runs on POSIX systems, all the paths it produces are
normalized.

We have no mapping to local directory, so having a path like
\home\user\project\file.cpp is confusing.

Change-Id: Idff339729231ab662aa4fcb6bb732058c1a04f7c
Reviewed-by: hjk <hjk@theqtcompany.com>
---
 src/plugins/valgrind/memcheckerrorview.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/plugins/valgrind/memcheckerrorview.cpp b/src/plugins/valgrind/memcheckerrorview.cpp
index 263a7b1f741..f64c8e583b5 100644
--- a/src/plugins/valgrind/memcheckerrorview.cpp
+++ b/src/plugins/valgrind/memcheckerrorview.cpp
@@ -109,7 +109,9 @@ static QString makeFrameName(const Frame &frame, const QString &relativeTo,
     if (frame.line() != -1)
         path += QLatin1Char(':') + QString::number(frame.line());
 
-    path = QDir::toNativeSeparators(path.toHtmlEscaped());
+    // Since valgrind only runs on POSIX systems, converting path separators
+    // will ruin the paths on Windows. Leave it untouched.
+    path = path.toHtmlEscaped();
 
     if (link && !f.isEmpty() && QFile::exists(fullPath)) {
         // make a hyperlink label
-- 
GitLab