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
a2efa137
Commit
a2efa137
authored
May 12, 2017
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix envelop script without "part"
parent
8c83add9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
1 deletion
+18
-1
src/ksieveui/autocreatescripts/autotests/data/test-envelop-without-part-ref.siv
...escripts/autotests/data/test-envelop-without-part-ref.siv
+9
-0
src/ksieveui/autocreatescripts/autotests/data/test-envelop-without-part.siv
...reatescripts/autotests/data/test-envelop-without-part.siv
+1
-0
src/ksieveui/autocreatescripts/autotests/sieveeditorgraphicalmodewidgettest.cpp
...escripts/autotests/sieveeditorgraphicalmodewidgettest.cpp
+1
-0
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionenvelope.cpp
...ocreatescripts/sieveconditions/sieveconditionenvelope.cpp
+7
-1
No files found.
src/ksieveui/autocreatescripts/autotests/data/test-envelop-without-part-ref.siv
0 → 100644
View file @
a2efa137
require "envelope";
require "subaddress";
#SCRIPTNAME: Script part 0
if envelope :all :matches "from" "*jim-???@*"
{
discard;
stop;
}
\ No newline at end of file
src/ksieveui/autocreatescripts/autotests/data/test-envelop-without-part.siv
0 → 100644
View file @
a2efa137
if envelope :matches "from" "*jim-???@*" { discard; stop; }
src/ksieveui/autocreatescripts/autotests/sieveeditorgraphicalmodewidgettest.cpp
View file @
a2efa137
...
...
@@ -115,6 +115,7 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts_data()
QTest
::
newRow
(
"test-elseif"
)
<<
QStringLiteral
(
"test-elseif"
)
<<
false
<<
true
;
QTest
::
newRow
(
"test-address-order"
)
<<
QStringLiteral
(
"test-address-order"
)
<<
false
<<
true
;
QTest
::
newRow
(
"test-regexp"
)
<<
QStringLiteral
(
"test-regexp"
)
<<
false
<<
true
;
QTest
::
newRow
(
"test-envelop-without-part"
)
<<
QStringLiteral
(
"test-envelop-without-part"
)
<<
false
<<
true
;
}
...
...
src/ksieveui/autocreatescripts/sieveconditions/sieveconditionenvelope.cpp
View file @
a2efa137
...
...
@@ -128,8 +128,14 @@ bool SieveConditionEnvelope::setParamWidgetValue(const QDomElement &element, QWi
if
(
tagName
==
QLatin1String
(
"tag"
))
{
const
QString
tagValue
=
e
.
text
();
if
(
indexTag
==
0
)
{
QString
err
;
SelectAddressPartComboBox
*
selectAddressPart
=
w
->
findChild
<
SelectAddressPartComboBox
*>
(
QStringLiteral
(
"addresspartcombobox"
));
selectAddressPart
->
setCode
(
AutoCreateScriptUtil
::
tagValue
(
tagValue
),
name
(),
error
);
selectAddressPart
->
setCode
(
AutoCreateScriptUtil
::
tagValue
(
tagValue
),
name
(),
err
);
//all: is default sometime we don't add it.
if
(
!
err
.
isEmpty
())
{
SelectMatchTypeComboBox
*
selectMatchCombobox
=
w
->
findChild
<
SelectMatchTypeComboBox
*>
(
QStringLiteral
(
"matchtypecombobox"
));
selectMatchCombobox
->
setCode
(
AutoCreateScriptUtil
::
tagValueWithCondition
(
tagValue
,
notCondition
),
name
(),
error
);
}
}
else
if
(
indexTag
==
1
)
{
SelectMatchTypeComboBox
*
selectMatchCombobox
=
w
->
findChild
<
SelectMatchTypeComboBox
*>
(
QStringLiteral
(
"matchtypecombobox"
));
selectMatchCombobox
->
setCode
(
AutoCreateScriptUtil
::
tagValueWithCondition
(
tagValue
,
notCondition
),
name
(),
error
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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