Commit 2f5369b3 authored by Laurent Montel's avatar Laurent Montel 😁

Fix enclose support

parent 6235028a
require "ihave";
require "enclose";
#SCRIPTNAME: Script part 0
#Script name: enclose
if ihave "enclosz"
{
enclose :subject "subject" :headers "headers" text:
text
.
;
}
\ No newline at end of file
require "ihave";
require "enclose";
#Script name: enclose
if ihave "enclosz"
{
enclose :subject "subject" :headers "headers" text:
text
.
;
}
......@@ -123,6 +123,7 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts_data()
QTest::newRow("delete-headers") << QStringLiteral("delete-headers") << false << true;
QTest::newRow("mailboxexist") << QStringLiteral("mailboxexist") << false << true;
QTest::newRow("extract-text") << QStringLiteral("extract-text") << false << true;
QTest::newRow("eenclose") << QStringLiteral("enclose") << false << true;
}
......
......@@ -81,13 +81,13 @@ bool SieveActionEnclose::setParamWidgetValue(const QDomElement &element, QWidget
if (tagValue == QLatin1String("headers")) {
const QString strValue = AutoCreateScriptUtil::strValue(node);
if (!strValue.isEmpty()) {
QLineEdit *subject = w->findChild<QLineEdit *>(QStringLiteral("subject"));
QLineEdit *subject = w->findChild<QLineEdit *>(QStringLiteral("headers"));
subject->setText(strValue);
}
} else if (tagValue == QLatin1String("subject")) {
const QString strValue = AutoCreateScriptUtil::strValue(node);
if (!strValue.isEmpty()) {
QLineEdit *headers = w->findChild<QLineEdit *>(QStringLiteral("headers"));
QLineEdit *headers = w->findChild<QLineEdit *>(QStringLiteral("subject"));
headers->setText(strValue);
}
} else {
......
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