Commit 7b742db8 authored by Nate Graham's avatar Nate Graham
Browse files

Save the dialog view settings when closing the dialog without hitting the cancel button

Save the view settings when the user closes the dialog using the excape key or the titlebar close button. Completes the feature requested in 209559.

CCBUG: 209559

Depends on D12227

Test Plan: Compile and deploy change, open Kate, open a file open or save dialog, change some settings, hit the escape key or the titlebar cancel button, then open a dialog again

Reviewers: #frameworks, davidedmundson

Reviewed By: davidedmundson

Subscribers: anthonyfieroni, elvisangelaccio, plasma-devel

Tags: #plasma

Differential Revision:
parent bfd41a95
......@@ -106,6 +106,10 @@ KDEPlatformFileDialog::KDEPlatformFileDialog()
m_buttons->addButton(m_fileWidget->okButton(), QDialogButtonBox::AcceptRole);
m_buttons->addButton(m_fileWidget->cancelButton(), QDialogButtonBox::RejectRole);
connect(m_buttons, SIGNAL(rejected()), m_fileWidget, SLOT(slotCancel()));
// Also call the cancel function when the dialog is closed via the escape key
// or titlebar close button to make sure we always save the view config
connect(this, &KDEPlatformFileDialog::rejected,
m_fileWidget, &KFileWidget::slotCancel);
connect(m_fileWidget->okButton(), SIGNAL(clicked(bool)), m_fileWidget, SLOT(slotOk()));
connect(m_fileWidget, SIGNAL(accepted()), m_fileWidget, SLOT(accept()));
connect(m_fileWidget, SIGNAL(accepted()), SLOT(accept()));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment