Bug 343906 - Unable to handle plain directory paths as QUrl
Summary: Unable to handle plain directory paths as QUrl
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-07 20:40 UTC by Elias Probst
Modified: 2015-02-10 05:58 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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