Utils: Make Utils::withTildeHomePath a FilePath member

Gets .osType() right in remote cases.

Change-Id: I6397996062d976d7db690c5729dd4faa1f459563
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2023-01-03 17:04:52 +01:00
parent 55fa109b59
commit ac9023e851
9 changed files with 51 additions and 50 deletions

View File

@@ -26,11 +26,6 @@ QTCREATOR_UTILS_EXPORT QString settingsKey(const QString &category);
// "C:\foo\bar1" "C:\foo\bar2" -> "C:\foo\bar"
QTCREATOR_UTILS_EXPORT QString commonPrefix(const QStringList &strings);
// On Linux/Mac replace user's home path with ~
// Uses cleaned path and tries to use absolute path of "path" if possible
// If path is not sub of home path, or when running on Windows, returns the input
QTCREATOR_UTILS_EXPORT QString withTildeHomePath(const QString &path);
// Removes first unescaped ampersand in text
QTCREATOR_UTILS_EXPORT QString stripAccelerator(const QString &text);
// Quotes all ampersands