┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMisha Vicha <[email protected]>2025-08-01 15:19:53 +0200
committerMisha Vicha <[email protected]>2025-08-09 14:54:08 +0000
commitbdb098c0f829d10ef0dcd587c63af65d3cf59658 (patch)
tree00c71949730d227abef8bb39d8fc43cdff8350dd
parentfba76f75c4cb7d259aca26f440b7793bdabeb370 (diff)
kio-admin: Update risk dialog result check
The check now correctly considers only KMessageDialog::PrimaryAction as confirmation, where before closing the window (4 isn't KMessageDialog::Cancel anymore) would pass through and still ask for the root password even when the prompt was technically cancelled. Also now correctly uses the Enum instead of a hardcoded integer.
-rw-r--r--src/admin/workerintegration.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/admin/workerintegration.cpp b/src/admin/workerintegration.cpp
index 0bf6b2890..a66357498 100644
--- a/src/admin/workerintegration.cpp
+++ b/src/admin/workerintegration.cpp
@@ -164,7 +164,7 @@ void WorkerIntegration::toggleActAsAdmin()
KStandardGuiItem::cancel());
warningDialog.setDontAskAgainText(i18nc("@option:check", "Do not warn me about these risks again"));
- risksAccepted = warningDialog.exec() != 4 /* Cancel */;
+ risksAccepted = warningDialog.exec() == KMessageDialog::PrimaryAction;
if (warningDialog.isDontAskAgainChecked()) {
KMessageBox::saveDontShowAgainContinue(warningDontShowAgainName);
}