Bug 343906

Summary: Unable to handle plain directory paths as QUrl
Product: [Applications] dolphin Reporter: Elias Probst <mail>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: arjunak234, emmanuelpescosta099, simonandric5
Priority: NOR    
Version: 16.12.2   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Elias Probst 2015-02-07 20:40:33 UTC
Running "dolphin /tmp" will result in Dolphin showing:
- in the location bar: "Bluetooth > tmp"
- in the content window: nothing
- in the terminal: every ~30 seconds or so: "Invalid URL:  QUrl( "/tmp" )"

Running "dolphin file:///tmp" works fine.

This affects many cases where Dolphin is launched externally (e.g. opening a USB drive via Kickoff/Removable Devices Applet/krunner/…).
Dolphin needs to convert local paths to a proper file:// QUrl before attempting to open it.

Running latest Dolphin/KF5 (frameworks/a159856) from git + Qt 5.4.0.
Comment 1 Emmanuel Pescosta 2015-02-07 21:11:52 UTC
Thanks for the bug report, I can confirm this problem.
QUrl::fromUserInput() should be used to create the list of urls.
Comment 2 Arjun AK 2015-02-08 03:47:22 UTC
https://git.reviewboard.kde.org/r/122475/
Comment 3 Arjun AK 2015-02-09 12:48:25 UTC
Git commit 1d85c2ce8f1ead9075fde51d7a931d44f347c60b by Arjun AK.
Committed on 09/02/2015 at 12:31.
Pushed by arjunak into branch 'frameworks'.

Construct URLs passed via cmdline args using QUrl::fromUserInput()

Otherwise user will have to type "dolphin file:///tmp" instead of
"dolphin /tmp"

REVIEW: 122475

M  +3    -1    dolphin/src/main.cpp

http://commits.kde.org/kde-baseapps/1d85c2ce8f1ead9075fde51d7a931d44f347c60b
Comment 4 Arjun AK 2015-02-10 05:58:40 UTC
Git commit 0f91025a752b37ea4b6f2e7c02507bda5863e71f by Arjun AK.
Committed on 10/02/2015 at 05:51.
Pushed by arjunak into branch 'frameworks'.

Assume links passed via cmdline args are local files

If not, when the user types 'dolphin nonexistantfile' he will be
taken to 'http://nonexistantfile'

M  +1    -1    dolphin/src/main.cpp

http://commits.kde.org/kde-baseapps/0f91025a752b37ea4b6f2e7c02507bda5863e71f