summaryrefslogtreecommitdiff
path: root/user/kdebugsettings/new-kmessagebox.patch
blob: 957590476cc42d3040f08b4420cc4f8291b7a0e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
KMessageBox doesn't support warningYesNo any more.

This is a somewhat backport of upstream commit babc1c0a08[^1], but
without the ifdef chicanery since we know we are using 5.100+.

[^1]: https://invent.kde.org/utilities/kdebugsettings/-/commit/babc1c0a080b171aa0e44ae16e231b77b2e6500c

--- kdebugsettings-22.04.2/src/customdebugsettingspage.cpp.old	2022-06-04 08:29:53.000000000 +0000
+++ kdebugsettings-22.04.2/src/customdebugsettingspage.cpp	2025-08-12 08:28:08.136276098 +0000
@@ -182,7 +182,7 @@
     }
     const QString str = i18np("Do you want to remove this rule?", "Do you want to remove these %1 rules?", lst.count());
 
-    if (KMessageBox::No == KMessageBox::warningYesNo(this, str)) {
+    if (KMessageBox::ButtonCode::SecondaryAction == KMessageBox::warningTwoActions(this, str, i18n("Remove Rule"), KStandardGuiItem::remove(), KStandardGuiItem::cancel())) {
         return;
     }
     for (int i = 0; i < lst.count(); ++i) {