Commit 393d9121 authored by Laurent Montel's avatar Laurent Montel 😁

Inform when script has a feature that server doesn't support

parent 9367c3bd
...@@ -81,9 +81,12 @@ bool SieveActionFileInto::setParamWidgetValue(const QDomElement &element, QWidge ...@@ -81,9 +81,12 @@ bool SieveActionFileInto::setParamWidgetValue(const QDomElement &element, QWidge
QCheckBox *create = w->findChild<QCheckBox *>(QStringLiteral("create")); QCheckBox *create = w->findChild<QCheckBox *>(QStringLiteral("create"));
create->setChecked(true); create->setChecked(true);
} else { } else {
serverDoesNotSupportFeatures(QStringLiteral("fileinto"), error); serverDoesNotSupportFeatures(QStringLiteral("create"), error);
qCDebug(LIBKSIEVE_LOG) << "SieveActionFileInto::setParamWidgetValue server has not create support "; qCDebug(LIBKSIEVE_LOG) << "SieveActionFileInto::setParamWidgetValue server has not create support ";
} }
} else {
serverDoesNotSupportFeatures(tagValue, error);
qCDebug(LIBKSIEVE_LOG) << "SieveActionFileInto::setParamWidgetValue server has not flags support ";
} }
} else if (tagName == QLatin1String("str")) { } else if (tagName == QLatin1String("str")) {
const QString tagValue = e.text(); const QString tagValue = e.text();
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "sieveconditionwidgetlister.h" #include "sieveconditionwidgetlister.h"
#include "autocreatescriptdialog.h" #include "autocreatescriptdialog.h"
#include "autocreatescriptutil_p.h" #include "autocreatescriptutil_p.h"
#include "libksieve_debug.h"
#include "commonwidgets/sievehelpbutton.h" #include "commonwidgets/sievehelpbutton.h"
#include "sieveeditorgraphicalmodewidget.h" #include "sieveeditorgraphicalmodewidget.h"
#include "sieveconditions/sieveconditionlist.h" #include "sieveconditions/sieveconditionlist.h"
...@@ -205,6 +206,9 @@ void SieveConditionWidget::setCondition(const QString &conditionName, const QDom ...@@ -205,6 +206,9 @@ void SieveConditionWidget::setCondition(const QString &conditionName, const QDom
slotConditionChanged(index); slotConditionChanged(index);
KSieveUi::SieveCondition *condition = mConditionList.at(index); KSieveUi::SieveCondition *condition = mConditionList.at(index);
condition->setParamWidgetValue(element, this, notCondition, error); condition->setParamWidgetValue(element, this, notCondition, error);
} else {
error += i18n("Script contains unsupported feature \"%1\"", conditionName);
qCDebug(LIBKSIEVE_LOG) << "Condition " << conditionName << " not supported";
} }
} }
......
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