Review Request 129714: Disable rename action from Trash

Emmanuel Pescosta emmanuelpescosta099 at gmail.com
Sun Jan 1 19:05:30 GMT 2017


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



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?

- Emmanuel Pescosta


On Dec. 28, 2016, 4: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, 4: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/b37dab56/attachment.htm>


More information about the kfm-devel mailing list