Bug 357795

Summary: dragon no longer allows files to be given on the command line
Product: [Applications] dragonplayer Reporter: Darin McBride <Tanktalus>
Component: generalAssignee: Harald Sitter <sitter>
Status: RESOLVED FIXED    
Severity: normal CC: myriam, rdieter
Priority: NOR    
Version First Reported In: 2.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Darin McBride 2016-01-10 15:13:11 UTC
"dragon myvideo.mp4" used to work in KDE 4.14.  Now, with 15.08 I need to use "dragon file://`pwd`/myvideo.mp4" it seems - allowing the shortcut of a filename would be very very useful.

This seems like a regression in functionality to me.  I generally run dragon from the command line, not from dolphin.
Comment 1 Rex Dieter 2016-01-30 05:18:23 UTC
Confirmed testing with dragon-15.12.1, when executing:

$ dragon foo.avi

the text in the lower/left of the window displays:  http://foo.avi
Comment 2 Rex Dieter 2016-01-30 05:28:43 UTC
Interesting, looks like this got fixed in 15.08 branch (included in 15.08.3 release):
https://quickgit.kde.org/?p=dragon.git&a=commit&h=3709ea57268e0bd1545ccfa03771b1f1759347fa

 and master, 
https://quickgit.kde.org/?p=dragon.git&a=commit&h=3709ea57268e0bd1545ccfa03771b1f1759347fa

but the commit never landed in 15.12 branch.


Harold, how would you prefer this be handled?  merge master or cherry-pick the commit?
Comment 3 Harald Sitter 2016-01-30 09:26:44 UTC
Whoopsie, guess I didn't check for the new branch properly.

> Harold, how would you prefer this be handled?  merge master or cherry-pick the commit?

Cherry-pick and forward merge, if you would be so kind, otherwise I'm going to on Monday :)
Comment 4 Rex Dieter 2016-01-30 15:08:47 UTC
Git commit ee333a83457450df771b458c299dce43a5500a35 by Rex Dieter, on behalf of Harald Sitter.
Committed on 30/01/2016 at 15:08.
Pushed by rdieter into branch 'Applications/15.12'.

when parsing user input urls, default to assume local files

The invocation

> dragon foo.mkv

should yield file://$PWD/foo.mkv. Processed as a URL foo.mkv can either be
a relative path or a FQDN though. Since we don't support scheme-less url
notiation for this use case and people are far more likely to use the
invocation argument for local files we can safely coerce QUrl to default
to assume file:// rather than http://

> dragon foo.mkv => file://$PWD/foo.mkv
> dragon http://foo.mkv => http://foo.mkv

M  +5    -1    src/app/main.cpp

http://commits.kde.org/dragon/ee333a83457450df771b458c299dce43a5500a35
Comment 5 Rex Dieter 2016-01-30 15:15:14 UTC
done, thanks.