Review Request 128666: Change KFileItemModel's createMimeData handling so it supports the upcoming stash:/ ioslave.

David Faure faure at kde.org
Sat Aug 13 09:11:56 BST 2016


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



I actually think url() or mostLocalUrl(), but not targetUrl(), should be used in all cases, in this code.

targetUrl() is supposed to be "the URL that opens when clicking on the file". All other KIO operations (copy, move, d-n-d) are supposed to use the item url() or mostLocalUrl().
git log points to bug 307336, review 111209, which was about nepomuksearch and tags. I remember those bending the rules a little bit about that stuff. Assuming baloo doesn't need this, I vote for porting this to mostLocalUrl().

But wait, the code already prefers mostLocalUrl(), a bit further down. Doesn't your slave set UDS_LOCAL_PATH ? Please debug what happens in this code.
canUseMostLocalUrls should be true, and data->setUrls(mostLocalUrls) should happen, in which case this patch shouldn't be needed.

- David Faure


On Aug. 13, 2016, 6:58 a.m., arnav dhamija wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128666/
> -----------------------------------------------------------
> 
> (Updated Aug. 13, 2016, 6:58 a.m.)
> 
> 
> Review request for Dolphin and Emmanuel Pescosta.
> 
> 
> Repository: dolphin
> 
> 
> Description
> -------
> 
> I am writing a new ioslave for Dolphin to make it possible to virtually stage directories without affecting the source. This requires the use of a targetUrl, but creating the mime data using the targetUrl is messing up my c/p operations through the Dolphin GUI as it does not respect the hierarchy of the stash:/ ioslave. Hence, I need createMimeData to use the item's url only for this ioslave. The special handling isn't very neat, but at least this way, it won't break any other existing ioslaves which need the targetUrl.
> 
> 
> Diffs
> -----
> 
>   src/kitemviews/kfileitemmodel.cpp 1f94972 
> 
> Diff: https://git.reviewboard.kde.org/r/128666/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> arnav dhamija
> 
>

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


More information about the kfm-devel mailing list