summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Winter <[email protected]>2017-08-13 14:54:17 -0400
committerAllen Winter <[email protected]>2017-08-13 14:54:17 -0400
commit1a0d53e255cbaf066ede70224320aa4cfa68a925 (patch)
treee363205d023e7feb22eb0b9e8ab9cc7082d6e3e3
parent7c19c262cbf30dc06624c7bedc11293ae69e4600 (diff)
src/sieveeditorpagewidget.cpp - fix error message if the upload fails
Differential Revision: https://phabricator.kde.org/D7284
-rw-r--r--src/sieveeditorpagewidget.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/sieveeditorpagewidget.cpp b/src/sieveeditorpagewidget.cpp
index eca75fd..59448a4 100644
--- a/src/sieveeditorpagewidget.cpp
+++ b/src/sieveeditorpagewidget.cpp
@@ -142,11 +142,16 @@ void SieveEditorPageWidget::slotPutResult(KManageSieve::SieveJob *job, bool succ
mSieveEditorWidget->setModified(false);
} else {
const QString msg = job->errorString();
- if (msg.isEmpty()) {
- KMessageBox::error(nullptr, i18n("Uploading the Sieve script failed.\n"
- "The server responded:\n%1", msg, i18n("Sieve Error")));
+ if (!msg.isEmpty()) {
+ KMessageBox::error(nullptr,
+ i18n("Uploading the Sieve script failed.\n"
+ "The server responded:\n%1", msg),
+ i18n("Sieve Error"));
} else {
- KMessageBox::error(nullptr, msg, i18n("Sieve Error"));
+ KMessageBox::error(nullptr,
+ i18n("Uploading the Sieve script failed.\n"
+ "unknown reason\n"),
+ i18n("Sieve Error"));
}
}
}