Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.2.0
-
None
-
Qt 5.2.0, Gentoo Linux, qt overlay (official/unmodified) Windows 7
Description
1. Create a QUrl from "http://www.facebook.com/" (Note the trailing slash)
2. Call QUrl::adjusted(QUrl::StripTrailingSlash)
I believe the problem is manifested in QUrl::appendPath():
while(thePath.length() > 1 && thePath.endsWith(QLatin1Char('/')))
thePath.chop(1);
Whereas in Qt 4.8.5:
while((options & StripTrailingSlash) && url.endsWith(QLatin1Char('/')))
url.chop();
Looks like we're stopping prematurely once we reach length 1 in the refactored code, whereas we should probably allow ourselves to remove all trailing slashes.
Attachments
Issue Links
- is duplicated by
-
QTBUG-47607 flag QUrl::StripTrailingSlash does not work
- Closed