Diffusion KIO b49e4dd526f6

Save the dialog view settings even when canceling

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


Save the dialog view settings even when canceling

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.

Reviewers: Frameworks, davidedmundson

Reviewed By: davidedmundson

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D12227


ngrahamApr 17 2018, 10:30 PM
Differential Revision
D12227: Save the dialog view settings even when canceling
R241:57b6b2d10131: [KFileWidget] Hardcode example user name