summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-08-27 14:31:20 (GMT)
committerMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-08-27 14:32:31 (GMT)
commitf655d13830df362427c7accd01e12ac07e17558d (patch)
treeb3e6c67ef43cd117169a05429667b1cfa8cffff6
parent5d35eb2c3b82979994b75c116d8c57ac8c8e398a (diff)
Don't give the user an empty error dialog on permission denied
-rw-r--r--src/konfigurator/konfigurator.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/konfigurator/konfigurator.cpp b/src/konfigurator/konfigurator.cpp
index 7bb3570..3ba3c9d 100644
--- a/src/konfigurator/konfigurator.cpp
+++ b/src/konfigurator/konfigurator.cpp
@@ -275,8 +275,11 @@ void KWalletConfig::save()
KAuth::ExecuteJob *j = action.execute();
if (!j->exec()) {
- qDebug() << j->errorText();
- KMessageBox::error(this, j->errorString(), i18n("KDE Wallet Control Module"));
+ if (j->error() == KAuth::ActionReply::AuthorizationDeniedError) {
+ KMessageBox::error(this, i18n("Permission denied."), i18n("KDE Wallet Control Module"));
+ } else {
+ KMessageBox::error(this, i18n("Error while authenticating action:\n%1", j->errorString()), i18n("KDE Wallet Control Module"));
+ }
load();
return;
}