Commit 816c924b authored by Kevin Funk's avatar Kevin Funk Committed by Laurent Montel
Browse files

followup: Preselect 'Delete' button

User explicitly asked for deletion of an item, so make it easy to
confirm this action.
parent 47986921
......@@ -245,13 +245,12 @@ void FollowUpReminderInfoWidget::deleteItems(const QList<QTreeWidgetItem *> &mai
if (mailItemLst.isEmpty()) {
qCDebug(FOLLOWUPREMINDERAGENT_LOG) << "Not item selected";
} else {
const int answer =
KMessageBox::warningYesNo(this,
i18np("Do you want to delete this selected item?", "Do you want to delete these %1 selected items?", mailItemLst.count()),
i18nc("@title:window", "Delete Items"),
KStandardGuiItem::del(),
KStandardGuiItem::cancel());
if (answer == KMessageBox::Yes) {
const auto answer = KMessageBox::warningContinueCancel(
this,
i18np("Do you want to delete this selected item?", "Do you want to delete these %1 selected items?", mailItemLst.count()),
i18nc("@title:window", "Delete Items"),
KStandardGuiItem::del());
if (answer == KMessageBox::Continue) {
for (QTreeWidgetItem *item : mailItemLst) {
auto mailItem = static_cast<FollowUpReminderInfoItem *>(item);
mListRemoveId << mailItem->info()->uniqueIdentifier();
......
Markdown is supported
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