... for local URLs too.
For example normalizing "/Users/sam/troll/qt4.0/.." by following the
alogrithm at https://www.ietf.org/rfc/rfc3986.html#section-5.2.4:
- replace "/.." with a "/" in the input buffer, then remove the previous
path segment from the output buffer up to, and including, the
previous "/"
- next iteration will find the input buffer starting with a "/" which
is moved to the output buffer; the final result would be:
"/Users/sam/troll/"
Remove the KeepLocalTrailingSlash enumerator, it's become redundant with
this change.
De-duplicate a row in tst_QDir.
[ChangeLog][Important Behavior Change] Aligned how QDir and QUrl
normalize paths with respect to preserving a trailing slash. That is,
QDir::cleanPath("/b/.") and
QUrl("file:///b/.).toString(QUrl::NormalizePathSegments) will return
"/b/" and "file:///b/" respectively. For more details see:
https://www.ietf.org/rfc/rfc3986.html#section-5.2.4
Task-number: QTBUG-128940
Change-Id: Id5a4bdab14e7312a60b1b54de07e5d9f3e8aa40a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ec894d694506fcce75fc9643f08dfb1c79f64c8b)