Utils: Fix FilePath::withTildeHomePath()

Or rather, re-instate previous behavior.

Amends c9023e85108.

Change-Id: I1be0dd8c42db8430323b8368a8164b1623d5ced5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2023-01-10 15:37:17 +01:00
parent 0dfa542bee
commit 2c65bfa0ea

View File

@@ -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)