Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
libksieve
Commits
aaf364b8
Commit
aaf364b8
authored
Jun 23, 2017
by
Laurent Montel
Browse files
Fix vacation support
parent
53c5cf05
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/ksieveui/autocreatescripts/autocreatescriptutil.cpp
View file @
aaf364b8
...
...
@@ -138,9 +138,10 @@ QString AutoCreateScriptUtil::strValue(QXmlStreamReader &node)
const
QStringRef
textElementTagName
=
node
.
name
();
if
(
textElementTagName
==
QLatin1String
(
"str"
))
{
return
node
.
readElementText
();
}
else
{
node
.
skipCurrentElement
();
}
}
return
QString
();
}
...
...
src/ksieveui/autocreatescripts/sieveactions/sieveactionvacation.cpp
View file @
aaf364b8
...
...
@@ -109,7 +109,14 @@ bool SieveActionVacation::setParamWidgetValue(QXmlStreamReader &element, QWidget
//Nothing wait num tag for it.
}
else
if
(
tagValue
==
QLatin1String
(
"addresses"
))
{
QLineEdit
*
addresses
=
w
->
findChild
<
QLineEdit
*>
(
QStringLiteral
(
"addresses"
));
addresses
->
setText
(
AutoCreateScriptUtil
::
strValue
(
element
));
if
(
element
.
readNextStartElement
())
{
const
QStringRef
textElementTagName
=
element
.
name
();
if
(
textElementTagName
==
QLatin1String
(
"str"
))
{
addresses
->
setText
(
element
.
readElementText
());
}
else
if
(
textElementTagName
==
QLatin1String
(
"list"
))
{
addresses
->
setText
(
AutoCreateScriptUtil
::
listValueToStr
(
element
));
}
}
}
else
if
(
tagValue
==
QLatin1String
(
"subject"
))
{
QLineEdit
*
subject
=
w
->
findChild
<
QLineEdit
*>
(
QStringLiteral
(
"subject"
));
subject
->
setText
(
AutoCreateScriptUtil
::
strValue
(
element
));
...
...
@@ -123,9 +130,6 @@ bool SieveActionVacation::setParamWidgetValue(QXmlStreamReader &element, QWidget
}
else
if
(
tagName
==
QLatin1String
(
"str"
))
{
MultiLineEdit
*
text
=
w
->
findChild
<
MultiLineEdit
*>
(
QStringLiteral
(
"text"
));
text
->
setPlainText
(
element
.
readElementText
());
}
else
if
(
tagName
==
QLatin1String
(
"list"
))
{
QLineEdit
*
addresses
=
w
->
findChild
<
QLineEdit
*>
(
QStringLiteral
(
"addresses"
));
addresses
->
setText
(
AutoCreateScriptUtil
::
listValueToStr
(
element
));
}
else
if
(
tagName
==
QLatin1String
(
"crlf"
))
{
element
.
skipCurrentElement
();
//nothing
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment