From bdb098c0f829d10ef0dcd587c63af65d3cf59658 Mon Sep 17 00:00:00 2001 From: Misha Vicha Date: Fri, 1 Aug 2025 15:19:53 +0200 Subject: [PATCH] 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. --- src/admin/workerintegration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.47.3