aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/stringutils.h
diff options
context:
space:
mode:
authorcon <[email protected]>2010-07-13 16:42:36 +0200
committercon <[email protected]>2010-07-14 14:45:18 +0200
commit352b491c87aba787fa1e87d04ea79c282f5b843d (patch)
treee7615b78d733b940488173a46261645c920e5a62 /src/libs/utils/stringutils.h
parent29af23cdb16341e5e1d517520b0a03b91f5048b3 (diff)
On Linux/Mac, show home path as ~ in recent projects.
Reviewed-by: Daniel Molkentin
Diffstat (limited to 'src/libs/utils/stringutils.h')
-rw-r--r--src/libs/utils/stringutils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libs/utils/stringutils.h b/src/libs/utils/stringutils.h
index 16cac815ded..a863a617719 100644
--- a/src/libs/utils/stringutils.h
+++ b/src/libs/utils/stringutils.h
@@ -50,6 +50,11 @@ QTCREATOR_UTILS_EXPORT QString commonPrefix(const QStringList &strings);
// "C:\foo\bar1" "C:\foo\bar2" -> "C:\foo"
QTCREATOR_UTILS_EXPORT QString commonPath(const QStringList &files);
+// 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);
+
} // namespace Utils
#endif // SETTINGSTUTILS_H