Fixed handling of relative paths by KUrlNavigator
Needs ReviewPublic

Authored by mdlubakowski on Feb 9 2020, 5:14 PM.

Details

Reviewers
dfaure
elvisangelaccio
Group Reviewers
Frameworks
Summary

Typing a relative path (one that doesn't start with / or protocol) into KUrlNavigator widget currently always causes it to try opening it in browser.
This is caused inside KUrlNavigator::uncommitedUrl by QUrl::fromUserInput if we don't give it current working directory path as a second argument.
However, rather than providing cwd, it makes more sense to simply concat path typed by user to current URL, because this way it works correctly with protocols like ftp: gdrive: programs: etc.

BUG: 319700

Diff Detail

Repository
R241 KIO
Branch
fix-relative-paths (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22271
Build 22289: arc lint + arc unit
mdlubakowski created this revision.Feb 9 2020, 5:14 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 9 2020, 5:14 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
mdlubakowski requested review of this revision.Feb 9 2020, 5:14 PM
ahmadsamir added a subscriber: ahmadsamir.

I am curious, why would you remove the already present part of the path? when I make the url navigator editable, the text cursor is already at the end of the path, so I can just start typing the name of a sub-direcotry in the current directory, and it'll offer auto-completion.