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.
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);
}