Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libksieve
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PIM
libksieve
Commits
3ea29c55
Commit
3ea29c55
authored
Jun 22, 2017
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix autotest 60 success now
parent
609bb85a
Changes
42
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
256 additions
and
204 deletions
+256
-204
src/ksieveui/autocreatescripts/autocreatescriptutil.cpp
src/ksieveui/autocreatescripts/autocreatescriptutil.cpp
+3
-0
src/ksieveui/autocreatescripts/sieveactions/sieveactionabstractflags.cpp
...tocreatescripts/sieveactions/sieveactionabstractflags.cpp
+2
-0
src/ksieveui/autocreatescripts/sieveactions/sieveactionaddheader.cpp
...i/autocreatescripts/sieveactions/sieveactionaddheader.cpp
+2
-0
src/ksieveui/autocreatescripts/sieveactions/sieveactionbreak.cpp
...eveui/autocreatescripts/sieveactions/sieveactionbreak.cpp
+7
-0
src/ksieveui/autocreatescripts/sieveactions/sieveactionconvert.cpp
...eui/autocreatescripts/sieveactions/sieveactionconvert.cpp
+2
-0
src/ksieveui/autocreatescripts/sieveactions/sieveactiondeleteheader.cpp
...utocreatescripts/sieveactions/sieveactiondeleteheader.cpp
+9
-5
src/ksieveui/autocreatescripts/sieveactions/sieveactionenclose.cpp
...eui/autocreatescripts/sieveactions/sieveactionenclose.cpp
+2
-0
src/ksieveui/autocreatescripts/sieveactions/sieveactionereject.cpp
...eui/autocreatescripts/sieveactions/sieveactionereject.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveactions/sieveactionextracttext.cpp
...autocreatescripts/sieveactions/sieveactionextracttext.cpp
+2
-0
src/ksieveui/autocreatescripts/sieveactions/sieveactionfileinto.cpp
...ui/autocreatescripts/sieveactions/sieveactionfileinto.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveactions/sieveactionkeep.cpp
...ieveui/autocreatescripts/sieveactions/sieveactionkeep.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveactions/sieveactionnotify.cpp
...veui/autocreatescripts/sieveactions/sieveactionnotify.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveactions/sieveactionredirect.cpp
...ui/autocreatescripts/sieveactions/sieveactionredirect.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveactions/sieveactionreject.cpp
...veui/autocreatescripts/sieveactions/sieveactionreject.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveactions/sieveactionreplace.cpp
...eui/autocreatescripts/sieveactions/sieveactionreplace.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveactions/sieveactionsetvariable.cpp
...autocreatescripts/sieveactions/sieveactionsetvariable.cpp
+4
-7
src/ksieveui/autocreatescripts/sieveactions/sieveactionvacation.cpp
...ui/autocreatescripts/sieveactions/sieveactionvacation.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveactionwidgetlister.cpp
src/ksieveui/autocreatescripts/sieveactionwidgetlister.cpp
+6
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionaddress.cpp
...tocreatescripts/sieveconditions/sieveconditionaddress.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionbody.cpp
.../autocreatescripts/sieveconditions/sieveconditionbody.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionconvert.cpp
...tocreatescripts/sieveconditions/sieveconditionconvert.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditioncurrentdate.cpp
...eatescripts/sieveconditions/sieveconditioncurrentdate.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditiondate.cpp
.../autocreatescripts/sieveconditions/sieveconditiondate.cpp
+24
-21
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionenvelope.cpp
...ocreatescripts/sieveconditions/sieveconditionenvelope.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionenvironment.cpp
...eatescripts/sieveconditions/sieveconditionenvironment.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionexists.cpp
...utocreatescripts/sieveconditions/sieveconditionexists.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionfalse.cpp
...autocreatescripts/sieveconditions/sieveconditionfalse.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionhasflag.cpp
...tocreatescripts/sieveconditions/sieveconditionhasflag.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionheader.cpp
...utocreatescripts/sieveconditions/sieveconditionheader.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionihave.cpp
...autocreatescripts/sieveconditions/sieveconditionihave.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionmailboxexists.cpp
...tescripts/sieveconditions/sieveconditionmailboxexists.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionmetadata.cpp
...ocreatescripts/sieveconditions/sieveconditionmetadata.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionmetadataexists.cpp
...escripts/sieveconditions/sieveconditionmetadataexists.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionservermetadata.cpp
...escripts/sieveconditions/sieveconditionservermetadata.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionservermetadataexists.cpp
...ts/sieveconditions/sieveconditionservermetadataexists.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionsize.cpp
.../autocreatescripts/sieveconditions/sieveconditionsize.cpp
+2
-1
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionspamtest.cpp
...ocreatescripts/sieveconditions/sieveconditionspamtest.cpp
+9
-20
src/ksieveui/autocreatescripts/sieveconditions/sieveconditiontrue.cpp
.../autocreatescripts/sieveconditions/sieveconditiontrue.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionvirustest.cpp
...createscripts/sieveconditions/sieveconditionvirustest.cpp
+9
-18
src/ksieveui/autocreatescripts/sieveconditionwidgetlister.cpp
...ksieveui/autocreatescripts/sieveconditionwidgetlister.cpp
+12
-7
src/ksieveui/autocreatescripts/sievescriptblockwidget.cpp
src/ksieveui/autocreatescripts/sievescriptblockwidget.cpp
+6
-0
src/ksieveui/autocreatescripts/sievescriptlistbox.cpp
src/ksieveui/autocreatescripts/sievescriptlistbox.cpp
+130
-125
No files found.
src/ksieveui/autocreatescripts/autocreatescriptutil.cpp
View file @
3ea29c55
...
...
@@ -25,6 +25,7 @@
#include <KPluginFactory>
#include <QStringList>
#include <QRegularExpression>
#include <QDebug>
#include "autocreatescripts/sieveconditions/widgets/regexpeditorlineedit.h"
using
namespace
KSieveUi
;
...
...
@@ -133,8 +134,10 @@ QString AutoCreateScriptUtil::tagValue(const QString &tag)
QString
AutoCreateScriptUtil
::
strValue
(
QXmlStreamReader
&
node
)
{
qDebug
()
<<
" QString AutoCreateScriptUtil::strValue(QXmlStreamReader &node)66666666666666666666666"
;
if
(
node
.
readNextStartElement
())
{
const
QStringRef
textElementTagName
=
node
.
name
();
qDebug
()
<<
"SSSSSSSSSSSSSSSSSSSSSSSSSSSSS QString AutoCreateScriptUtil::strValue(QXmlStreamReader &node)"
<<
textElementTagName
;
if
(
textElementTagName
==
QLatin1String
(
"str"
))
{
return
node
.
readElementText
();
}
...
...
src/ksieveui/autocreatescripts/sieveactions/sieveactionabstractflags.cpp
View file @
3ea29c55
...
...
@@ -55,8 +55,10 @@ bool SieveActionAbstractFlags::setParamWidgetValue(QXmlStreamReader &element, QW
SelectFlagsWidget
*
flagsWidget
=
w
->
findChild
<
SelectFlagsWidget
*>
(
QStringLiteral
(
"flagswidget"
));
flagsWidget
->
setFlags
(
QStringList
()
<<
element
.
readElementText
());
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
element
.
skipCurrentElement
();
//implement in the future ?
}
else
{
unknownTag
(
tagName
,
error
);
...
...
src/ksieveui/autocreatescripts/sieveactions/sieveactionaddheader.cpp
View file @
3ea29c55
...
...
@@ -88,8 +88,10 @@ bool SieveActionAddHeader::setParamWidgetValue(QXmlStreamReader &element, QWidge
}
++
index
;
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
element
.
skipCurrentElement
();
//implement in the future ?
}
else
{
unknownTag
(
tagName
,
error
);
...
...
src/ksieveui/autocreatescripts/sieveactions/sieveactionbreak.cpp
View file @
3ea29c55
...
...
@@ -53,22 +53,29 @@ QWidget *SieveActionBreak::createParamWidget(QWidget *parent) const
bool
SieveActionBreak
::
setParamWidgetValue
(
QXmlStreamReader
&
element
,
QWidget
*
w
,
QString
&
error
)
{
qDebug
()
<<
" bool SieveActionBreak::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)"
;
while
(
element
.
readNextStartElement
())
{
const
QStringRef
tagName
=
element
.
name
();
qDebug
()
<<
" tagName "
<<
tagName
;
if
(
tagName
==
QLatin1String
(
"tag"
))
{
const
QString
tagValue
=
element
.
readElementText
();
qDebug
()
<<
" bool SieveActionBreak::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)"
<<
tagValue
;
if
(
tagValue
==
QLatin1String
(
"name"
))
{
QLineEdit
*
name
=
w
->
findChild
<
QLineEdit
*>
(
QStringLiteral
(
"name"
));
name
->
setText
(
AutoCreateScriptUtil
::
strValue
(
element
));
qDebug
()
<<
" NAME !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
<<
name
->
text
();
}
else
{
unknowTagValue
(
tagValue
,
error
);
qCDebug
(
LIBKSIEVE_LOG
)
<<
" SieveActionBreak::setParamWidgetValue unknown tagValue "
<<
tagValue
;
}
}
else
if
(
tagName
==
QLatin1String
(
"str"
))
{
element
.
skipCurrentElement
();
//Nothing
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
element
.
skipCurrentElement
();
//implement in the future ?
}
else
{
unknownTag
(
tagName
,
error
);
...
...
src/ksieveui/autocreatescripts/sieveactions/sieveactionconvert.cpp
View file @
3ea29c55
...
...
@@ -89,8 +89,10 @@ bool SieveActionConvert::setParamWidgetValue(QXmlStreamReader &element, QWidget
SelectConvertParameterWidget
*
params
=
w
->
findChild
<
SelectConvertParameterWidget
*>
(
QStringLiteral
(
"params"
));
params
->
setCode
(
AutoCreateScriptUtil
::
listValue
(
element
),
error
);
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
element
.
skipCurrentElement
();
//implement in the future ?
}
else
{
unknownTag
(
tagName
,
error
);
...
...
src/ksieveui/autocreatescripts/sieveactions/sieveactiondeleteheader.cpp
View file @
3ea29c55
...
...
@@ -73,12 +73,14 @@ bool SieveActionDeleteHeader::parseValue(QXmlStreamReader &element, QWidget *w,
while
(
element
.
readNextStartElement
())
{
const
QStringRef
tagName
=
element
.
name
();
if
(
tagName
==
QLatin1String
(
"test"
))
{
#ifdef FIXME_QDOMELEMENT
const
QDomNode
testNode
=
e
.
toElement
();
const
QString
nameValue
=
e
.
attribute
(
QStringLiteral
(
"name"
),
QString
());
QString
nameValue
;
if
(
element
.
attributes
().
hasAttribute
(
QStringLiteral
(
"name"
)))
{
nameValue
=
element
.
attributes
().
value
(
QStringLiteral
(
"name"
)).
toString
();
}
const
bool
isNegative
=
(
nameValue
==
QLatin1String
(
"not"
));
return
parseValue
(
element
,
w
,
error
,
isNegative
);
#endif
bool
result
=
parseValue
(
element
,
w
,
error
,
isNegative
);
element
.
skipCurrentElement
();
return
result
;
}
else
if
(
tagName
==
QLatin1String
(
"tag"
))
{
SelectMatchTypeComboBox
*
combo
=
w
->
findChild
<
SelectMatchTypeComboBox
*>
(
QStringLiteral
(
"matchtype"
));
combo
->
setCode
(
AutoCreateScriptUtil
::
tagValueWithCondition
(
element
.
readElementText
(),
isNegative
),
name
(),
error
);
...
...
@@ -95,8 +97,10 @@ bool SieveActionDeleteHeader::parseValue(QXmlStreamReader &element, QWidget *w,
}
++
index
;
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
element
.
skipCurrentElement
();
//implement in the future ?
}
else
{
unknownTag
(
tagName
,
error
);
...
...
src/ksieveui/autocreatescripts/sieveactions/sieveactionenclose.cpp
View file @
3ea29c55
...
...
@@ -95,8 +95,10 @@ bool SieveActionEnclose::setParamWidgetValue(QXmlStreamReader &element, QWidget
MultiLineEdit
*
edit
=
w
->
findChild
<
MultiLineEdit
*>
(
QStringLiteral
(
"text"
));
edit
->
setPlainText
(
element
.
readElementText
());
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
element
.
skipCurrentElement
();
//implement in the future ?
}
else
{
unknownTag
(
tagName
,
error
);
...
...
src/ksieveui/autocreatescripts/sieveactions/sieveactionereject.cpp
View file @
3ea29c55
...
...
@@ -59,6 +59,7 @@ bool SieveActionEReject::setParamWidgetValue(QXmlStreamReader &element, QWidget
MultiLineEdit
*
edit
=
w
->
findChild
<
MultiLineEdit
*>
(
QStringLiteral
(
"rejectmessage"
));
edit
->
setPlainText
(
AutoCreateScriptUtil
::
quoteStr
(
tagValue
));
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
//implement in the future ?
...
...
src/ksieveui/autocreatescripts/sieveactions/sieveactionextracttext.cpp
View file @
3ea29c55
...
...
@@ -68,6 +68,7 @@ bool SieveActionExtractText::setParamWidgetValue(QXmlStreamReader &element, QWid
const
QStringRef
tagName
=
element
.
name
();
if
(
tagName
==
QLatin1String
(
"tag"
))
{
element
.
skipCurrentElement
();
//TODO ?
}
else
if
(
tagName
==
QLatin1String
(
"num"
))
{
QSpinBox
*
numberOfCharacters
=
w
->
findChild
<
QSpinBox
*>
(
QStringLiteral
(
"numberOfCharacters"
));
...
...
@@ -76,6 +77,7 @@ bool SieveActionExtractText::setParamWidgetValue(QXmlStreamReader &element, QWid
QLineEdit
*
variableName
=
w
->
findChild
<
QLineEdit
*>
(
QStringLiteral
(
"variablename"
));
variableName
->
setText
(
element
.
readElementText
());
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
//implement in the future ?
...
...
src/ksieveui/autocreatescripts/sieveactions/sieveactionfileinto.cpp
View file @
3ea29c55
...
...
@@ -90,6 +90,7 @@ bool SieveActionFileInto::setParamWidgetValue(QXmlStreamReader &element, QWidget
KSieveUi
::
AbstractMoveImapFolderWidget
*
edit
=
w
->
findChild
<
KSieveUi
::
AbstractMoveImapFolderWidget
*>
(
QStringLiteral
(
"fileintolineedit"
));
edit
->
setText
(
AutoCreateScriptUtil
::
protectSlash
(
tagValue
));
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
//implement in the future ?
...
...
src/ksieveui/autocreatescripts/sieveactions/sieveactionkeep.cpp
View file @
3ea29c55
...
...
@@ -91,6 +91,7 @@ bool SieveActionKeep::setParamWidgetValue(QXmlStreamReader &element, QWidget *w,
}
else
if
(
tagName
==
QLatin1String
(
"tag"
)
&&
element
.
readElementText
()
==
QLatin1String
(
"flags"
))
{
//nothing :)
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
//implement in the future ?
...
...
src/ksieveui/autocreatescripts/sieveactions/sieveactionnotify.cpp
View file @
3ea29c55
...
...
@@ -90,6 +90,7 @@ bool SieveActionNotify::setParamWidgetValue(QXmlStreamReader &element, QWidget *
qCDebug
(
LIBKSIEVE_LOG
)
<<
" SieveActionNotify::setParamWidgetValue unknown tagValue"
<<
tagValue
;
}
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
//implement in the future ?
...
...
src/ksieveui/autocreatescripts/sieveactions/sieveactionredirect.cpp
View file @
3ea29c55
...
...
@@ -93,6 +93,7 @@ bool SieveActionRedirect::setParamWidgetValue(QXmlStreamReader &element, QWidget
qCDebug
(
LIBKSIEVE_LOG
)
<<
" SieveActionRedirect::setParamWidgetValue tagValue unknown"
<<
tagValue
;
}
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
setComment
(
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveactions/sieveactionreject.cpp
View file @
3ea29c55
...
...
@@ -59,6 +59,7 @@ bool SieveActionReject::setParamWidgetValue(QXmlStreamReader &element, QWidget *
MultiLineEdit
*
edit
=
w
->
findChild
<
MultiLineEdit
*>
(
QStringLiteral
(
"rejectmessage"
));
edit
->
setPlainText
(
AutoCreateScriptUtil
::
quoteStr
(
tagValue
));
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
//implement in the future ?
...
...
src/ksieveui/autocreatescripts/sieveactions/sieveactionreplace.cpp
View file @
3ea29c55
...
...
@@ -95,6 +95,7 @@ bool SieveActionReplace::setParamWidgetValue(QXmlStreamReader &element, QWidget
qCDebug
(
LIBKSIEVE_LOG
)
<<
" SieveActionReplace::setParamWidgetValue unknown tagValue "
<<
tagValue
;
}
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
//implement in the future ?
...
...
src/ksieveui/autocreatescripts/sieveactions/sieveactionsetvariable.cpp
View file @
3ea29c55
...
...
@@ -89,19 +89,15 @@ bool SieveActionSetVariable::setParamWidgetValue(QXmlStreamReader &element, QWid
const
QString
tagValue
=
element
.
readElementText
();
QLineEdit
*
value
=
w
->
findChild
<
QLineEdit
*>
(
QStringLiteral
(
"value"
));
value
->
setText
(
tagValue
);
#ifdef QDOMELEMENT_FIXME
node
=
node
.
nextSibling
();
QDomElement
variableElement
=
node
.
toElement
();
if
(
!
variableElement
.
isNull
())
{
const
QString
variableTagName
=
variableElement
.
tagName
();
if
(
element
.
readNextStartElement
())
{
const
QStringRef
variableTagName
=
element
.
name
();
if
(
variableTagName
==
QLatin1String
(
"str"
))
{
QLineEdit
*
variable
=
w
->
findChild
<
QLineEdit
*>
(
QStringLiteral
(
"variable"
));
variable
->
setText
(
AutoCreateScriptUtil
::
protectSlash
(
variableElement
.
t
ext
()));
variable
->
setText
(
AutoCreateScriptUtil
::
protectSlash
(
element
.
readElementT
ext
()));
}
}
else
{
return
false
;
}
#endif
}
else
if
(
tagName
==
QLatin1String
(
"tag"
))
{
const
QString
tagValue
=
element
.
readElementText
();
if
(
tagValue
==
QLatin1String
(
"quoteregex"
))
{
...
...
@@ -116,6 +112,7 @@ bool SieveActionSetVariable::setParamWidgetValue(QXmlStreamReader &element, QWid
modifier
->
setCode
(
AutoCreateScriptUtil
::
tagValue
(
tagValue
),
name
(),
error
);
}
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
//implement in the future ?
...
...
src/ksieveui/autocreatescripts/sieveactions/sieveactionvacation.cpp
View file @
3ea29c55
...
...
@@ -127,6 +127,7 @@ bool SieveActionVacation::setParamWidgetValue(QXmlStreamReader &element, QWidget
QLineEdit
*
addresses
=
w
->
findChild
<
QLineEdit
*>
(
QStringLiteral
(
"addresses"
));
addresses
->
setText
(
AutoCreateScriptUtil
::
listValueToStr
(
element
));
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
//implement in the future ?
...
...
src/ksieveui/autocreatescripts/sieveactionwidgetlister.cpp
View file @
3ea29c55
...
...
@@ -261,6 +261,7 @@ void SieveActionWidget::updateAddRemoveButton(bool addButtonEnabled, bool remove
bool
SieveActionWidget
::
setAction
(
const
QString
&
actionName
,
QXmlStreamReader
&
element
,
const
QString
&
comment
,
QString
&
error
)
{
qDebug
()
<<
"bool SieveActionWidget::setAction(const QString &actionName, QXmlStreamReader &element, const QString &comment, QString &error)"
<<
actionName
;
const
int
index
=
mComboBox
->
findData
(
actionName
);
bool
result
=
false
;
if
(
index
!=
-
1
)
{
...
...
@@ -365,6 +366,7 @@ int SieveActionWidgetLister::actionNumber() const
void
SieveActionWidgetLister
::
loadScript
(
QXmlStreamReader
&
element
,
bool
onlyActions
,
QString
&
error
)
{
qDebug
()
<<
" void SieveActionWidgetLister::loadScript(QXmlStreamReader &element, bool onlyActions, QString &error) onlyaction"
<<
onlyActions
;
QString
comment
;
if
(
onlyActions
)
{
const
QStringRef
tagName
=
element
.
name
();
...
...
@@ -379,6 +381,7 @@ void SieveActionWidgetLister::loadScript(QXmlStreamReader &element, bool onlyAct
w
->
setAction
(
actionName
,
element
,
comment
,
error
);
//comment.clear();
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
{
qCDebug
(
LIBKSIEVE_LOG
)
<<
" SieveActionWidgetLister::loadScript don't have name attribute "
<<
tagName
;
...
...
@@ -391,9 +394,11 @@ void SieveActionWidgetLister::loadScript(QXmlStreamReader &element, bool onlyAct
bool
previousActionWasAComment
=
false
;
while
(
element
.
readNextStartElement
())
{
const
QStringRef
tagName
=
element
.
name
();
qDebug
()
<<
"ieveActionWidgetLister::loadScript SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSs"
<<
tagName
;
if
(
tagName
==
QLatin1String
(
"action"
)
||
tagName
==
QLatin1String
(
"control"
)
/*for break action*/
)
{
if
(
element
.
attributes
().
hasAttribute
(
QStringLiteral
(
"name"
)))
{
const
QString
actionName
=
element
.
attributes
().
value
(
QStringLiteral
(
"name"
)).
toString
();
qDebug
()
<<
"************************************* actionName"
<<
actionName
;
if
(
tagName
==
QLatin1String
(
"control"
)
&&
actionName
==
QLatin1String
(
"if"
))
{
qCDebug
(
LIBKSIEVE_LOG
)
<<
"We found an loop if in a loop if. Not supported"
;
error
+=
i18n
(
"We detected a loop if in a loop if. It's not supported"
)
+
QLatin1Char
(
'\n'
);
...
...
@@ -421,6 +426,7 @@ void SieveActionWidgetLister::loadScript(QXmlStreamReader &element, bool onlyAct
if
(
previousActionWasAComment
)
{
comment
+=
QLatin1Char
(
'\n'
);
}
element
.
skipCurrentElement
();
}
else
{
qCDebug
(
LIBKSIEVE_LOG
)
<<
" SieveActionWidgetLister::loadScript unknown tagName "
<<
tagName
;
}
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionaddress.cpp
View file @
3ea29c55
...
...
@@ -144,6 +144,7 @@ bool SieveConditionAddress::setParamWidgetValue(QXmlStreamReader &element, QWidg
}
++
indexStr
;
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionbody.cpp
View file @
3ea29c55
...
...
@@ -125,6 +125,7 @@ bool SieveConditionBody::setParamWidgetValue(QXmlStreamReader &element, QWidget
strValue
<<
element
.
readElementText
();
++
indexStr
;
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionconvert.cpp
View file @
3ea29c55
...
...
@@ -128,6 +128,7 @@ bool SieveConditionConvert::setParamWidgetValue(QXmlStreamReader &element, QWidg
SelectConvertParameterWidget
*
params
=
w
->
findChild
<
SelectConvertParameterWidget
*>
(
QStringLiteral
(
"params"
));
params
->
setCode
(
AutoCreateScriptUtil
::
listValue
(
element
),
error
);
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditioncurrentdate.cpp
View file @
3ea29c55
...
...
@@ -112,6 +112,7 @@ bool SieveConditionCurrentDate::setParamWidgetValue(QXmlStreamReader &element, Q
SelectMatchTypeComboBox
*
selectMatchCombobox
=
w
->
findChild
<
SelectMatchTypeComboBox
*>
(
QStringLiteral
(
"matchtype"
));
selectMatchCombobox
->
setCode
(
AutoCreateScriptUtil
::
tagValueWithCondition
(
element
.
readElementText
(),
notCondition
),
name
(),
error
);
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditiondate.cpp
View file @
3ea29c55
...
...
@@ -106,6 +106,7 @@ QString SieveConditionDate::help() const
bool
SieveConditionDate
::
setParamWidgetValue
(
QXmlStreamReader
&
element
,
QWidget
*
w
,
bool
notCondition
,
QString
&
error
)
{
qDebug
()
<<
" bool SieveConditionDate::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, bool notCondition, QString &error)"
;
int
index
=
0
;
QString
type
;
QString
value
;
...
...
@@ -113,29 +114,31 @@ bool SieveConditionDate::setParamWidgetValue(QXmlStreamReader &element, QWidget
QString
commentStr
;
while
(
element
.
readNextStartElement
())
{
const
QStringRef
tagName
=
element
.
name
();
if
(
tagName
==
QLatin1String
(
"str"
))
{
if
(
index
==
0
)
{
headerStr
=
element
.
readElementText
();
}
else
if
(
index
==
1
)
{
type
=
element
.
readElementText
();
}
else
if
(
index
==
2
)
{
value
=
element
.
readElementText
();
}
else
{
tooManyArgument
(
tagName
,
index
,
3
,
error
);
qCDebug
(
LIBKSIEVE_LOG
)
<<
" SieveConditionDate::setParamWidgetValue too many argument :"
<<
index
;
}
++
index
;
}
else
if
(
tagName
==
QLatin1String
(
"tag"
))
{
SelectMatchTypeComboBox
*
selectMatchCombobox
=
w
->
findChild
<
SelectMatchTypeComboBox
*>
(
QStringLiteral
(
"matchtype"
));
selectMatchCombobox
->
setCode
(
AutoCreateScriptUtil
::
tagValueWithCondition
(
element
.
readElementText
(),
notCondition
),
name
(),
error
);
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
qDebug
()
<<
" tagName "
<<
tagName
;
if
(
tagName
==
QLatin1String
(
"str"
))
{
if
(
index
==
0
)
{
headerStr
=
element
.
readElementText
();
}
else
if
(
index
==
1
)
{
type
=
element
.
readElementText
();
}
else
if
(
index
==
2
)
{
value
=
element
.
readElementText
();
}
else
{
unknownTag
(
tagName
,
error
);
qCDebug
(
LIBKSIEVE_LOG
)
<<
"
SieveConditionDate::setParamWidgetValue unknown tag "
<<
tagName
;
tooManyArgument
(
tagName
,
index
,
3
,
error
);
qCDebug
(
LIBKSIEVE_LOG
)
<<
"
SieveConditionDate::setParamWidgetValue too many argument :"
<<
index
;
}
++
index
;
}
else
if
(
tagName
==
QLatin1String
(
"tag"
))
{
SelectMatchTypeComboBox
*
selectMatchCombobox
=
w
->
findChild
<
SelectMatchTypeComboBox
*>
(
QStringLiteral
(
"matchtype"
));
selectMatchCombobox
->
setCode
(
AutoCreateScriptUtil
::
tagValueWithCondition
(
element
.
readElementText
(),
notCondition
),
name
(),
error
);
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
}
else
{
unknownTag
(
tagName
,
error
);
qCDebug
(
LIBKSIEVE_LOG
)
<<
"SieveConditionDate::setParamWidgetValue unknown tag "
<<
tagName
;
}
}
if
(
!
commentStr
.
isEmpty
())
{
setComment
(
commentStr
);
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionenvelope.cpp
View file @
3ea29c55
...
...
@@ -168,6 +168,7 @@ bool SieveConditionEnvelope::setParamWidgetValue(QXmlStreamReader &element, QWid
}
++
indexStr
;
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionenvironment.cpp
View file @
3ea29c55
...
...
@@ -124,6 +124,7 @@ bool SieveConditionEnvironment::setParamWidgetValue(QXmlStreamReader &element, Q
}
++
index
;
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionexists.cpp
View file @
3ea29c55
...
...
@@ -91,6 +91,7 @@ bool SieveConditionExists::setParamWidgetValue(QXmlStreamReader &element, QWidge
SelectHeaderTypeComboBox
*
selectHeaderType
=
w
->
findChild
<
SelectHeaderTypeComboBox
*>
(
QStringLiteral
(
"headervalue"
));
selectHeaderType
->
setCode
(
AutoCreateScriptUtil
::
listValueToStr
(
element
));
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionfalse.cpp
View file @
3ea29c55
...
...
@@ -64,6 +64,7 @@ bool SieveConditionFalse::setParamWidgetValue(QXmlStreamReader &element, QWidget
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
{
unknownTag
(
tagName
,
error
);
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionhasflag.cpp
View file @
3ea29c55
...
...
@@ -150,6 +150,7 @@ bool SieveConditionHasFlag::setParamWidgetValue(QXmlStreamReader &element, QWidg
}
else
if
(
tagName
==
QLatin1String
(
"str"
))
{
strList
<<
element
.
readElementText
();
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionheader.cpp
View file @
3ea29c55
...
...
@@ -132,6 +132,7 @@ bool SieveConditionHeader::setParamWidgetValue(QXmlStreamReader &element, QWidge
}
++
index
;
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionihave.cpp
View file @
3ea29c55
...
...
@@ -89,6 +89,7 @@ bool SieveConditionIhave::setParamWidgetValue(QXmlStreamReader &element, QWidget
QLineEdit
*
edit
=
w
->
findChild
<
QLineEdit
*>
(
QStringLiteral
(
"edit"
));
edit
->
setText
(
tagValue
);
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionmailboxexists.cpp
View file @
3ea29c55
...
...
@@ -87,6 +87,7 @@ bool SieveConditionMailboxExists::setParamWidgetValue(QXmlStreamReader &element,
QLineEdit
*
edit
=
w
->
findChild
<
QLineEdit
*>
(
QStringLiteral
(
"edit"
));
edit
->
setText
(
AutoCreateScriptUtil
::
quoteStr
(
tagValue
));
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionmetadata.cpp
View file @
3ea29c55
...
...
@@ -163,6 +163,7 @@ bool SieveConditionMetaData::setParamWidgetValue(QXmlStreamReader &element, QWid
SelectMatchTypeComboBox
*
selectType
=
w
->
findChild
<
SelectMatchTypeComboBox
*>
(
QStringLiteral
(
"selecttype"
));
selectType
->
setCode
(
AutoCreateScriptUtil
::
tagValueWithCondition
(
element
.
readElementText
(),
notCondition
),
name
(),
error
);
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionmetadataexists.cpp
View file @
3ea29c55
...
...
@@ -109,6 +109,7 @@ bool SieveConditionMetaDataExists::setParamWidgetValue(QXmlStreamReader &element
}
++
index
;
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionservermetadata.cpp
View file @
3ea29c55
...
...
@@ -164,6 +164,7 @@ bool SieveConditionServerMetaData::setParamWidgetValue(QXmlStreamReader &element
SelectMatchTypeComboBox
*
selectType
=
w
->
findChild
<
SelectMatchTypeComboBox
*>
(
QStringLiteral
(
"selecttype"
));
selectType
->
setCode
(
AutoCreateScriptUtil
::
tagValueWithCondition
(
element
.
readElementText
(),
notCondition
),
name
(),
error
);
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionservermetadataexists.cpp
View file @
3ea29c55
...
...
@@ -88,6 +88,7 @@ bool SieveConditionServerMetaDataExists::setParamWidgetValue(QXmlStreamReader &e
QLineEdit
*
value
=
w
->
findChild
<
QLineEdit
*>
(
QStringLiteral
(
"value"
));
value
->
setText
(
tagValue
);
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionsize.cpp
View file @
3ea29c55
...
...
@@ -82,14 +82,15 @@ bool SieveConditionSize::setParamWidgetValue(QXmlStreamReader &element, QWidget
combo
->
setCurrentIndex
(
index
);
}
}
else
if
(
tagName
==
QLatin1String
(
"num"
))
{
const
qlonglong
tagValue
=
element
.
readElementText
().
toLongLong
();
QString
numIdentifier
;
if
(
element
.
attributes
().
hasAttribute
(
QStringLiteral
(
"quantifier"
)))
{
numIdentifier
=
element
.
attributes
().
value
(
QStringLiteral
(
"quantifier"
)).
toString
();
}
const
qlonglong
tagValue
=
element
.
readElementText
().
toLongLong
();
SelectSizeWidget
*
sizeWidget
=
w
->
findChild
<
SelectSizeWidget
*>
(
QStringLiteral
(
"sizewidget"
));
sizeWidget
->
setCode
(
tagValue
,
numIdentifier
,
name
(),
error
);
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionspamtest.cpp
View file @
3ea29c55
...
...
@@ -130,31 +130,19 @@ bool SieveConditionSpamTest::setParamWidgetValue(QXmlStreamReader &element, QWid
if
(
tagName
==
QLatin1String
(
"tag"
))
{
const
QString
tagValue
=
element
.
readElementText
();
if
(
tagValue
==
QLatin1String
(
"count"
)
||
tagValue
==
QLatin1String
(
"value"
))
{
#ifdef QDOMELEMENT_FIXME
node
=
node
.
nextSibling
();
if
(
!
node
.
isNull
())
{
QDomElement
relationalElement
=
node
.
toElement
();
if
(
!
relationalElement
.
isNull
())
{
if
(
relationalElement
.
tagName
()
==
QLatin1String
(
"str"
))
{
SelectRelationalMatchType
*
relation
=
w
->
findChild
<
SelectRelationalMatchType
*>
(
QStringLiteral
(
"relation"
));
relation
->
setCode
(
AutoCreateScriptUtil
::
tagValue
(
tagValue
),
relationalElement
.
text
(),
name
(),
error
);
}
if
(
element
.
readNextStartElement
())
{
if
(
element
.
name
()
==
QLatin1String
(
"str"
))
{
SelectRelationalMatchType
*
relation
=
w
->
findChild
<
SelectRelationalMatchType
*>
(
QStringLiteral
(
"relation"
));
relation
->
setCode
(
AutoCreateScriptUtil
::
tagValue
(
tagValue
),
element
.
readElementText
(),
name
(),
error
);
}
}
#endif
}
else
if
(
tagValue
==
QLatin1String
(
"comparator"
))
{
#ifdef QDOMELEMENT_FIXME
node
=
node
.
nextSibling
();
if
(
!
node
.
isNull
())
{
QDomElement
comparatorElement
=
node
.
toElement
();
if
(
!
comparatorElement
.
isNull
())
{
if
(
comparatorElement
.
tagName
()
==
QLatin1String
(
"str"
))
{
SelectComparatorComboBox
*
comparator
=
w
->
findChild
<
SelectComparatorComboBox
*>
(
QStringLiteral
(
"comparator"
));
comparator
->
setCode
(
comparatorElement
.
text
(),
name
(),
error
);
}
if
(
element
.
readNextStartElement
())
{
if
(
element
.
name
()
==
QLatin1String
(
"str"
))
{
SelectComparatorComboBox
*
comparator
=
w
->
findChild
<
SelectComparatorComboBox
*>
(
QStringLiteral
(
"comparator"
));
comparator
->
setCode
(
element
.
readElementText
(),
name
(),
error
);
}
}
#endif
}
else
if
(
tagValue
==
QLatin1String
(
"percent"
))
{
if
(
mHasSpamTestPlusSupport
)
{
QCheckBox
*
checkbox
=
w
->
findChild
<
QCheckBox
*>
(
QStringLiteral
(
"percent"
));
...
...
@@ -171,6 +159,7 @@ bool SieveConditionSpamTest::setParamWidgetValue(QXmlStreamReader &element, QWid
QSpinBox
*
spinbox
=
w
->
findChild
<
QSpinBox
*>
(
QStringLiteral
(
"value"
));
spinbox
->
setValue
(
element
.
readElementText
().
toInt
());
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
}
else
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditiontrue.cpp
View file @
3ea29c55
...
...
@@ -64,6 +64,7 @@ bool SieveConditionTrue::setParamWidgetValue(QXmlStreamReader &element, QWidget
if
(
tagName
==
QLatin1String
(
"comment"
))
{
commentStr
=
AutoCreateScriptUtil
::
loadConditionComment
(
commentStr
,
element
.
readElementText
());