Fix scrolling to renamed file when using the rename dialog
ClosedPublic

Authored by elvisangelaccio on Jun 3 2018, 4:34 PM.

Details

Summary

The RenameDialog::slotResult() slot is currently never called because
the dialog is deleted first, due to the usage of the WA_DeleteOnClose
attribute. This breaks the scroll-to-renamed-file feature when the
inline renaming is disabled.

Instead of deleting the dialog on close, we can use deleteLater() when
we are sure the dialog has actually finished its job, which is when the
KIO move job emits the result signal.

Test Plan
  • Disable inline renaming
  • Rename a file so that it goes out of the view
  • Check whether the view scrolls to the renamed file.

Diff Detail

Repository
R318 Dolphin
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
elvisangelaccio created this revision.Jun 3 2018, 4:34 PM
Restricted Application added a project: Dolphin. · View Herald TranscriptJun 3 2018, 4:34 PM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
elvisangelaccio requested review of this revision.Jun 3 2018, 4:34 PM
ngraham accepted this revision.Jun 3 2018, 6:17 PM
ngraham added a subscriber: ngraham.

Works great, couldn't break it.

This revision is now accepted and ready to land.Jun 3 2018, 6:17 PM

Works for me as well. One potential issue is that the object is not deleted if the rename operation is cancelled as the flag is not there anymore.

Works for me as well. One potential issue is that the object is not deleted if the rename operation is cancelled as the flag is not there anymore.

Good catch, we can easily fix this.

  • Also delete when the dialog is rejected
emateli accepted this revision.Jun 4 2018, 9:49 PM
This revision was automatically updated to reflect the committed changes.