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.