Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.11.1
-
None
Description
Using QDir:::cleanPath on Windows file names does not results in expected path according to documention, e.g
qDebug() << QString("C:/foo/bar: %0").arg(QDir::cleanPath("C:/foo/bar")); qDebug() << QString("C:\foo\bar: %0").arg(QDir::cleanPath("C:\foo\bar")); qDebug() << QString("C:\\foo\\bar: %0").arg(QDir::cleanPath("C:\\foo\\bar"));
shows this output on linux machine
"C:/foo/bar: C:/foo/bar" "C:\foo\bar: C:\foo\bar" "C:\\foo\\bar: C:\\foo\\bar"
...and this output on windows machine
"C:/foo/bar: C:/foo/bar" "C:\foo\bar: C:\foo\bar" "C:\\foo\\bar: C:/foo/bar"
In the documentation QDir::cleanPath is explained like this:
Returns path with directory separators normalized (converted to "/") and redundant ones removed, and "."s and ".."s resolved (as far as possible).
This is obviously not true and confusing.