D10071: Change an assert to do as the function documentation tells

Jaime Torres Amate noreply at phabricator.kde.org
Wed Jan 24 15:38:33 UTC 2018


jtamate added inline comments.

INLINE COMMENTS

> dfaure wrote in urlutil_p.h:69
> s/S/s/ twice
> 
> You could also just use adjustedCurrentUrl.path(QUrl::StripTrailingSlash), no?
> Then you wouldn't have to deal with the fact that the path might end with a slash
> (and it would also cover the case where it ends with two or more consecutive slashes....)

It is already done (it's a pity that this can't be seen creating the patch using the web):

  const QUrl adjustedLastUrl = lastUrl.adjusted(QUrl::StripTrailingSlash);
  const QUrl adjustedCurrentUrl = currentUrl.adjusted(QUrl::StripTrailingSlash);
   

but in the case of the new test, the values are:
"/d" and "/" from the originals: "file:///d" and "file:///"

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D10071

To: jtamate, #frameworks, dfaure
Cc: ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180124/0c1025f4/attachment.html>


More information about the Kde-frameworks-devel mailing list