Review Request 129094: [dolphin] Add text/plain mime data with urls in PrettyDecoded string format

Alexandr Akulich akulichalexander at gmail.com
Tue Oct 4 15:29:10 BST 2016



> On Oct. 4, 2016, 7:09 p.m., Emmanuel Pescosta wrote:
> > Thanks for the patch!
> > 
> > This should be added to `KUrlMimeData::setUrls` instead.
> 
> Alexandr Akulich wrote:
>     I thought that the KUrlMimeData class can be used on Mime object with already exists custom text/plain data.
>     I can add a condition to add the text/plain only if it doesn't exist, will it be OK?

Hm. Current behaviour seems to be a bug, because:

Comment in KUrlMimeData::setUrls() says: "Export the most local urls as text/uri-list and plain text, for non KDE apps."
The methods calls QMimeData::setUrls(), which is documented as "Since Qt 5.0, setUrls also exports the urls as plain text, if setText was not called before, to make it possible to drop them into any lineedit and text editor."

We either call setText() or have a bug in Qt.


- Alexandr


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129094/#review99767
-----------------------------------------------------------


On Oct. 4, 2016, 7:04 p.m., Alexandr Akulich wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129094/
> -----------------------------------------------------------
> 
> (Updated Oct. 4, 2016, 7:04 p.m.)
> 
> 
> Review request for Dolphin.
> 
> 
> Repository: dolphin
> 
> 
> Description
> -------
> 
> Use case: copy file in Dolphin and paste its URL in Firefox
> 
> Some applications (such as QtCreator) are smart enough to use text/uri-list value, but, sadly, other applications (such as Firefox) accepts only text/plain
> 
> 
> Diffs
> -----
> 
>   src/kitemviews/kfileitemmodel.cpp 05f85a6 
> 
> Diff: https://git.reviewboard.kde.org/r/129094/diff/
> 
> 
> Testing
> -------
> 
> Now Ctrl+C on a file in Dolphin and Ctrl+V in the address line in Firefox works as expected.
> 
> 
> Thanks,
> 
> Alexandr Akulich
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20161004/1e364624/attachment.htm>


More information about the kfm-devel mailing list