Properly parse URL in KUrlNavigator

Review Request #120606 - Created Oct. 16, 2014 and submitted

Information
Jan Grulich
kio
Reviewers
kdeframeworks
dfaure

When using an URL with a scheme, like sftp://foo@bar.com/home/foo/, then KUrlNavigator doesn't properly parse it. At the beginning it tries to count the number of slashes from sftp://foo@bar.com, which is 2, then it tries to contruct buttons using names from particular sections separated by slashes, but when we use only QUrl::path() for URL above, we will always get only "/home/foo/" path and therefore we will have bigger index then the number of sections, which leads to have same URLs for all buttons. We need to parse sections from full URL including first two slashes.

Tested in dolphin and works fine now.

Files


Issues

  • 2
  • 0
  • 0
  • 2
Description From Last Updated
This looks wrong. After this line, path can contain either a path or a URL. Which means that transforming this ... David Faure David Faure
newUrl could be declared here, now, it's not used before this line. QUrl newUrl = ... return newUrl; or even ... David Faure David Faure
Lukáš Tinkl
Aleix Pol Gonzalez
David Faure
Jan Grulich
David Faure
Jan Grulich
Review request changed

Status: Closed (submitted)

Loading...