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.