Review Request 129714: Disable rename action from Trash

Elvis Angelaccio elvis.angelaccio at kde.org
Sun Jan 1 19:10:45 GMT 2017



> On Jan. 1, 2017, 7:05 p.m., Emmanuel Pescosta wrote:
> > I think that we should add a `KProtocolManager::supportsRenaming` (with `renaming = true` as default) instead of adding special cases to client applications. What do you think?

Yeah that would be better indeed. I'll try :)


- Elvis


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


On Dec. 28, 2016, 3:30 p.m., Elvis Angelaccio wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129714/
> -----------------------------------------------------------
> 
> (Updated Dec. 28, 2016, 3:30 p.m.)
> 
> 
> Review request for Dolphin and Emmanuel Pescosta.
> 
> 
> Bugs: 332465
>     https://bugs.kde.org/show_bug.cgi?id=332465
> 
> 
> Repository: dolphin
> 
> 
> Description
> -------
> 
> Dolphin relies on KFileItemListProperties::supportsMoving() to enable/disable the rename action. However, the trash:/ protocol is a corner case because while it supports moving, it explicitly forbids renaming urls from trash:/ to trash:/
> 
> ```c++
> // kio_trash.cpp, line 137
> if (oldURL.scheme() == QLatin1String("trash") && newURL.scheme() == QLatin1String("trash")) {
>     error(KIO::ERR_CANNOT_RENAME, oldURL.toString());
>     return;
> }
> ```
> 
> For this reason, we need to disable the rename action if the view is in the Trash.
> 
> BUG: 332465
> FIXED-IN: 16.12.1
> 
> 
> Diffs
> -----
> 
>   src/dolphinmainwindow.cpp e5103fd42 
>   src/dolphinpart.cpp aa9ab2986 
> 
> Diff: https://git.reviewboard.kde.org/r/129714/diff/
> 
> 
> Testing
> -------
> 
> F2 from Trash no longer triggers a useless rename job.
> 
> 
> Thanks,
> 
> Elvis Angelaccio
> 
>

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


More information about the kfm-devel mailing list