Bug 353647 - Copy file in Dolphin should return regular path, without "file://"
Summary: Copy file in Dolphin should return regular path, without "file://"
Status: RESOLVED NOT A BUG
Alias: None
Product: kate
Classification: Applications
Component: part (other bugs)
Version First Reported In: unspecified
Platform: Mint (Ubuntu based) Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-07 10:33 UTC by noric
Modified: 2015-10-11 06:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description noric 2015-10-07 10:33:10 UTC
A very similar bug has already been fixed some time ago: https://bugs.kde.org/show_bug.cgi?id=170608
That bug involved the location bar, but I guess the same patch could be applied to the bug that I'm now reporting.

Reproducible: Always

Steps to Reproduce:
1. Copy a file in Dolphin.
2. Paste in Kate or other program.


Actual Results:  
What gets pasted is:
file:///path/to/file

Expected Results:  
What should be pasted instead is:
/path/to/file
Comment 1 noric 2015-10-07 11:12:37 UTC
The bug is still there in latest KDE (latest Kubuntu weekly development  iso).
Comment 2 Emmanuel Pescosta 2015-10-10 13:35:54 UTC
Thanks for the bug report, I can reproduce the problem.

This has to be fixed in Kate.

I assume that:
Mime data has a list of urls, Kate converts those urls to strings via QUrl::toDisplayString but without the QUrl::PreferLocalFile formatting option.
Comment 3 Christoph Cullmann 2015-10-10 14:32:01 UTC
Actually, Kate/KWrite/Konsole/... just use 

QApplication::clipboard()->text(QClipboard::Clipboard)

And I actually don't expect /../../ but to always get some fully qualified url.

I am not sure how to change that, btw.
Comment 4 noric 2015-10-10 21:46:41 UTC
As Cristoph says, the problem occurs systemwide, not just in Kate.
Comment 5 Christoph Cullmann 2015-10-11 06:33:58 UTC
I think even not, that this is a problem.
You get a URL, which is fine, for many use cases you want the url. If you change that "somehow" to be a path for local things, other people will complain that they want a url.
In any case, this is no bug in KTextEditor/Kate/KWrite.