Skip to content
GitLab
Menu
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
4956d5c6
Commit
4956d5c6
authored
Oct 31, 2021
by
Laurent Montel
😁
Browse files
Use for(...:...) + remove unused index variable
parent
4f16b16e
Pipeline
#92791
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/ksieveui/autocreatescripts/sieveconditionwidgetlister.cpp
View file @
4956d5c6
...
...
@@ -83,26 +83,23 @@ void SieveConditionWidget::initWidget()
mComboBox
->
setEditable
(
false
);
const
QList
<
KSieveUi
::
SieveCondition
*>
list
=
KSieveUi
::
SieveConditionList
::
conditionList
(
mSieveGraphicalModeWidget
);
QList
<
KSieveUi
::
SieveCondition
*>::
const_iterator
it
;
QList
<
KSieveUi
::
SieveCondition
*>::
const_iterator
end
(
list
.
constEnd
());
int
index
=
0
;
for
(
index
=
0
,
it
=
list
.
constBegin
();
it
!=
end
;
++
it
,
++
index
)
{
if
((
*
it
)
->
needCheckIfServerHasCapability
())
{
if
(
mSieveGraphicalModeWidget
->
sieveCapabilities
().
contains
((
*
it
)
->
serverNeedsCapability
()))
{
for
(
const
auto
&
action
:
list
)
{
if
(
action
->
needCheckIfServerHasCapability
())
{
if
(
mSieveGraphicalModeWidget
->
sieveCapabilities
().
contains
(
action
->
serverNeedsCapability
()))
{
// append to the list of actions:
mConditionList
.
append
(
*
it
);
connect
(
*
it
,
&
SieveCondition
::
valueChanged
,
this
,
&
SieveConditionWidget
::
valueChanged
);
mConditionList
.
append
(
action
);
connect
(
action
,
&
SieveCondition
::
valueChanged
,
this
,
&
SieveConditionWidget
::
valueChanged
);
// add (i18n-ized) name to combo box
mComboBox
->
addItem
(
(
*
it
)
->
label
(),
(
*
it
)
->
name
());
mComboBox
->
addItem
(
action
->
label
(),
action
->
name
());
}
else
{
delete
(
*
it
)
;
delete
action
;
}
}
else
{
// append to the list of actions:
mConditionList
.
append
(
*
it
);
connect
(
*
it
,
&
SieveCondition
::
valueChanged
,
this
,
&
SieveConditionWidget
::
valueChanged
);
mConditionList
.
append
(
action
);
connect
(
action
,
&
SieveCondition
::
valueChanged
,
this
,
&
SieveConditionWidget
::
valueChanged
);
// add (i18n-ized) name to combo box
mComboBox
->
addItem
(
(
*
it
)
->
label
(),
(
*
it
)
->
name
());
mComboBox
->
addItem
(
action
->
label
(),
action
->
name
());
}
}
...
...
Write
Preview
Supports
Markdown
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