Prevent "Two clicks renaming" if the selected file/folder is not movable
ClosedPublic

Authored by akrutzler on Nov 9 2017, 8:18 PM.

Details

Summary

Two clicks renaming doesn't check if the user is actually allowed to rename a file/folder. With this patch, this get fixed.
Depends on D7647

Diff Detail

Repository
R318 Dolphin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
akrutzler created this revision.Nov 9 2017, 8:18 PM
Restricted Application added a subscriber: Dolphin. · View Herald TranscriptNov 9 2017, 8:18 PM
ngraham added a subscriber: ngraham.Nov 9 2017, 8:23 PM

Most of the changes in this diff look unrelated. Can you use this patch to only make the change in src/views/dolphinview.cpp, and focus on modernizing the code to use nullptr in another patch?

Also, I've been told that translation fixes shouldn't be done in patches. We should be using the existing localization tools for that.

rkflx added a comment.Nov 9 2017, 8:27 PM

Great, will have a look in the next days if no one beats me to it.

Just some general remarks:

  • You've got some unrelated changes in this Diff, i.e. some older commits slipped in. Maybe you need to rebase? In general you can check with arc which how your arc diff will turn out. Just try again with arc diff, no need to open a new Diff.
  • Adding a dependent Diff is not really necessary if it is already committed. This is mainly to prevent you from landing changes with unmet deps, visualize the dep stack and help reviewers get all Diffs with a single arc patch.
akrutzler updated this revision to Diff 22133.Nov 9 2017, 8:28 PM

Sorry, first time using arc.

rkflx added a comment.Nov 9 2017, 8:40 PM

Looks fine now, we all struggled with arc at first before getting comfortable :)

To add to my remark from above:

  • I'd just use something like "This is a follow-up patch to Dxxx", so Phab adds links without creating a dep stack.
  • Apparently if you add Fixes T7432, the task you opened will get closed on commit. I'd be interested to know if that works…

Excellent, will test tonight.

akrutzler updated this revision to Diff 22134.Nov 9 2017, 8:58 PM

Next try :)

Maybe I should set up phabricator locally on my machine to figure out all its magic :)

In D8740#166130, @rkflx wrote:

Looks fine now, we all struggled with arc at first before getting comfortable :)

To add to my remark from above:

  • I'd just use something like "This is a follow-up patch to Dxxx", so Phab adds links without creating a dep stack.
  • Apparently if you add Fixes T7432, the task you opened will get closed on commit. I'd be interested to know if that works…

Thanks for your advice! The T7432 task was mistakenly created, so we can delete it (if that is possible)

Just as a side node, this won't be needed once we'll have D7571, but for now we do need it indeed.

In D8740#166130, @rkflx wrote:
  • Apparently if you add Fixes T7432, the task you opened will get closed on commit. I'd be interested to know if that works…

Sure, that works.

src/views/dolphinview.cpp
1128–1134

Both can be const

ngraham accepted this revision.Nov 10 2017, 5:03 PM

Works like a charm. Address @elvisangelaccio's comment and I think we can land this.

This revision is now accepted and ready to land.Nov 10 2017, 5:03 PM
akrutzler updated this revision to Diff 22157.Nov 10 2017, 6:20 PM

item and capabilities are const now.

akrutzler marked an inline comment as done.Nov 10 2017, 6:21 PM
ngraham accepted this revision.Nov 10 2017, 6:21 PM
This revision was automatically updated to reflect the committed changes.