diff options
author | Louie S <louie@example.com> | 2024-03-18 15:05:06 -0400 |
---|---|---|
committer | Louie S <louie@example.com> | 2024-03-18 15:05:06 -0400 |
commit | a394dab92712a7a588805df69cd89710071f3a51 (patch) | |
tree | e43340052bc0ccd4de24d6d9759caf68aeb1b6c6 | |
parent | 3a9b931e6a8c5d21fb776791cbfaad4bcdb8cc56 (diff) |
Add question dialog before backend call in cleanHidden
-rw-r--r-- | src/assignmentList.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/assignmentList.cpp b/src/assignmentList.cpp index 8d041e4..c1e40f5 100644 --- a/src/assignmentList.cpp +++ b/src/assignmentList.cpp @@ -135,8 +135,16 @@ void AssignmentList::reload() { } void AssignmentList::cleanHidden() { + QMessageBox::StandardButton are_you_sure; BackendDB database; - database.cleanHidden(); + + // create 'are you sure?' dialog before going forward + are_you_sure = QMessageBox::question(this, "Are You Sure?", + "Are you sure? All removed groups and entries will be permanently deleted from the database.", + QMessageBox::Yes|QMessageBox::No); + + if(are_you_sure == QMessageBox::Yes) + database.cleanHidden(); } void AssignmentList::aboutDialog() { |