Commit afea8e19 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Don't try to export 0 rule

parent 9d5ccebe
......@@ -24,6 +24,7 @@
#include <KConfigGroup>
#include <KSharedConfig>
#include <KLocalizedString>
#include <KMessageBox>
#include <QDialogButtonBox>
#include <QVBoxLayout>
#include <QFileDialog>
......@@ -81,6 +82,10 @@ void DKIMManageRulesDialog::slotAccepted()
void DKIMManageRulesDialog::slotExport()
{
if (MessageViewer::DKIMManagerRules::self()->isEmpty()) {
KMessageBox::error(this, i18n("Any rules found"), i18n("Export Rules"));
return;
}
const QString fileName = QFileDialog::getSaveFileName(this, i18n("Export Rules"));
if (!fileName.isEmpty()) {
MessageViewer::DKIMManagerRules::self()->exportRules(fileName);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment