From 017cd2322a0ae4c57476871f7715904a7810c9d3 Mon Sep 17 00:00:00 2001 From: Amish Naidu Date: Mon, 25 Mar 2019 15:41:40 +0530 Subject: Prompt user to save/discard changes upon closing config dialog Summary: When the configuration dialog is closed with unsaved changes, a message box is prompted to save/discard them or cancel the event. BUG: 391206 Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: ngraham, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19904 --- src/settings/dolphinsettingsdialog.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/settings/dolphinsettingsdialog.h') diff --git a/src/settings/dolphinsettingsdialog.h b/src/settings/dolphinsettingsdialog.h index 4c8768fde..85871b12d 100644 --- a/src/settings/dolphinsettingsdialog.h +++ b/src/settings/dolphinsettingsdialog.h @@ -48,10 +48,14 @@ private slots: void applySettings(); void restoreDefaults(); +protected: + void closeEvent(QCloseEvent* event) override; + private: static SettingsPageBase *createTrashSettingsPage(QWidget *parent); QList m_pages; + bool m_unsavedChanges; }; #endif -- cgit v1.3.1