diff options
| author | Misha Vicha <[email protected]> | 2025-08-01 15:19:53 +0200 |
|---|---|---|
| committer | Misha Vicha <[email protected]> | 2025-08-09 14:54:08 +0000 |
| commit | bdb098c0f829d10ef0dcd587c63af65d3cf59658 (patch) | |
| tree | 00c71949730d227abef8bb39d8fc43cdff8350dd | |
| parent | fba76f75c4cb7d259aca26f440b7793bdabeb370 (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.cpp | 2 |
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); } |
