From 2c65bfa0ea54316eda153fa69cf118a56fdb6543 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 10 Jan 2023 15:37:17 +0100 Subject: [PATCH] Utils: Fix FilePath::withTildeHomePath() Or rather, re-instate previous behavior. Amends c9023e85108. Change-Id: I1be0dd8c42db8430323b8368a8164b1623d5ced5 Reviewed-by: Alessandro Portale --- src/libs/utils/filepath.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/utils/filepath.cpp b/src/libs/utils/filepath.cpp index 0362bc45761..c70848955f6 100644 --- a/src/libs/utils/filepath.cpp +++ b/src/libs/utils/filepath.cpp @@ -1705,8 +1705,9 @@ QString FilePath::withTildeHomePath() const QString outPath = cleanPath().absoluteFilePath().path(); if (outPath.startsWith(homePath)) - outPath = '~' + outPath.mid(homePath.size()); - return outPath; + return '~' + outPath.mid(homePath.size()); + + return toString(); } QTextStream &operator<<(QTextStream &s, const FilePath &fn)