Review Request 129714: Disable rename action from Trash

Elvis Angelaccio elvis.angelaccio at kde.org
Sun Feb 26 23:21:11 GMT 2017


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

(Updated Feb. 26, 2017, 11:21 p.m.)


Status
------

This change has been discarded.


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/20170226/b69f223f/attachment.htm>


More information about the kfm-devel mailing list