Save the dialog view settings even when canceling
ClosedPublic

Authored by ngraham on Apr 15 2018, 4:49 PM.

Details

Summary

Currently, for file Open & Save dialogs, any view settings you've changed are only remembered if you actually open or save the file; they're ignored if you cancel the dialog using the Cancel button. there's no particular reason why a user should want to discard any view changes just because they decided not to open or save the file, so we should fix that.

This patch fixes a bug causing the issue: the attempt to write the changed view config settings was issued after the KDirOperator had already been destroyed, so its settings were unavailable to be saved. Reversing the ordering of the statements fixes the issue.

BUG: 209559
FIXED-IN: 5.46

Test Plan

Open a file open or save dialog, change the view, hit the cancel button, then open it again.

Note: this patch does not fix the case of the view not being saved when closing the dialog via the Escape key or the titlebar close button; those cases need to be separately handled in the QPA theme plugin, which actually creates the dialog window; see D12239 and D12240.

Diff Detail

Repository
R241 KIO
Branch
save-dialog-view-settings-on-cancel (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage