Make QDir::cleanPath documentation less misleading

The code doesn't convert anything that might be a separator on other
platforms (most notably, '\') to '/', it only replaces platform-native
separators (i.e. '\' if running on Windows) with '/'.

Change-Id: I2e241b88b8bd271dfa5d7db61402fe8ef9a6bb6f
Fixes: QTBUG-79736
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
bb10
Volker Hilsheimer 2019-11-05 10:34:28 +01:00
parent 88047be4ec
commit 4ada4f283e
1 changed files with 3 additions and 2 deletions

View File

@ -2372,8 +2372,9 @@ static QString qt_cleanPath(const QString &path, bool *ok)
}
/*!
Returns \a path with directory separators normalized (converted to "/") and
redundant ones removed, and "."s and ".."s resolved (as far as possible).
Returns \a path with directory separators normalized (that is, platform-native
separators converted to "/") and redundant ones removed, and "."s and ".."s
resolved (as far as possible).
Symbolic links are kept. This function does not return the
canonical path, but rather the simplest version of the input.