Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 4c2941d9 authored by Laurent Montel's avatar Laurent Montel 😁

Add kmessagebox which informs if you want to delete items

parent d3044cc1
......@@ -37,6 +37,7 @@
#include <kiconloader.h>
#include <QIcon>
#include <KLocalizedString>
#include <KMessageBox>
#include "pimcommon_debug.h"
#include <QPushButton>
#include <QMenu>
......@@ -288,11 +289,13 @@ void SimpleStringListEditor::slotRemove()
if (selectedItems.isEmpty()) {
return;
}
for (QListWidgetItem *item : selectedItems) {
delete d->mListBox->takeItem(d->mListBox->row(item));
if (KMessageBox::Yes == KMessageBox::warningYesNo(this, i18n("Do you want to remove selected text?"), i18n("Remove"))) {
for (QListWidgetItem *item : selectedItems) {
delete d->mListBox->takeItem(d->mListBox->row(item));
}
slotSelectionChanged();
Q_EMIT changed();
}
slotSelectionChanged();
Q_EMIT changed();
}
QString SimpleStringListEditor::modifyEntry(const QString &text)
......
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