Commit 62f8e352 authored by Bharadwaj Raju's avatar Bharadwaj Raju 📚 Committed by Nate Graham
Browse files

[applets/clipboard] Change clear dialog to warningContinueCancel

Previously the "clear clipboard history?" dialog used `KMessageBox::questionYesNo`
which if "don't ask again" is ticked then saves the answer even if No was answered.
This can cause the user to not be able to ever clear the clipboard ever again. This
commit changes it to `KMessageBox::warningContinueCancel` which doesn't do that, and
is more appropriate for the kind of question we're asking.

BUG: 336053
FIXED-IN: 5.22
parent 64db2f09
......@@ -983,14 +983,14 @@ void Klipper::showBarcode(const QSharedPointer<const HistoryItem> &item)
void Klipper::slotAskClearHistory()
{
int clearHist = KMessageBox::questionYesNo(nullptr,
int clearHist = KMessageBox::warningContinueCancel(nullptr,
i18n("Really delete entire clipboard history?"),
i18n("Delete clipboard history?"),
KStandardGuiItem::yes(),
KStandardGuiItem::no(),
QStringLiteral("really_clear_history"),
KStandardGuiItem::cont(),
KStandardGuiItem::cancel(),
QStringLiteral("klipperClearHistoryAskAgain"),
KMessageBox::Dangerous);
if (clearHist == KMessageBox::Yes) {
if (clearHist == KMessageBox::Continue) {
history()->slotClear();
saveHistory();
}
......
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