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
PIM Messagelib
Commits
7333b547
Commit
7333b547
authored
Aug 23, 2021
by
Laurent Montel
😁
Browse files
Port some foreach
parent
c2724fd0
Pipeline
#76166
canceled with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
messagecomposer/src/composer/composerviewbase.cpp
View file @
7333b547
...
...
@@ -412,7 +412,8 @@ void ComposerViewBase::slotEmailAddressResolved(KJob *job)
}
}
else
{
// saved to draft, so keep the old values, not very nice.
mExpandedFrom
=
from
();
foreach
(
const
MessageComposer
::
Recipient
::
Ptr
&
r
,
m_recipientsEditor
->
recipients
())
{
const
auto
recipients
{
m_recipientsEditor
->
recipients
()};
for
(
const
MessageComposer
::
Recipient
::
Ptr
&
r
:
recipients
)
{
switch
(
r
->
type
())
{
case
MessageComposer
::
Recipient
::
To
:
mExpandedTo
<<
r
->
email
();
...
...
messagecomposer/src/recipient/recipientseditor.cpp
View file @
7333b547
...
...
@@ -198,8 +198,8 @@ void MessageComposer::RecipientsEditor::setRecentAddressConfig(KConfig *config)
{
d
->
mRecentAddressConfig
=
config
;
if
(
config
)
{
MultiplyingLine
*
line
;
for
each
(
line
,
lines
()
)
{
const
auto
linesP
{
lines
()}
;
for
(
auto
line
:
lines
P
)
{
auto
rec
=
qobject_cast
<
RecipientLineNG
*>
(
line
);
if
(
rec
)
{
rec
->
setRecentAddressConfig
(
config
);
...
...
@@ -349,7 +349,8 @@ void RecipientsEditor::slotCalculateTotal()
addData
();
}
int
count
=
0
;
foreach
(
line
,
lines
())
{
const
auto
linesP
{
lines
()};
for
(
auto
line
:
linesP
)
{
auto
rec
=
qobject_cast
<
RecipientLineNG
*>
(
line
);
if
(
rec
)
{
if
(
!
rec
->
isEmpty
())
{
...
...
messagelist/src/core/messageitem.cpp
View file @
7333b547
...
...
@@ -162,7 +162,8 @@ void MessageItemPrivate::invalidateAnnotationCache()
const
MessageItem
::
Tag
*
MessageItemPrivate
::
bestTag
()
const
{
const
MessageItem
::
Tag
*
best
=
nullptr
;
foreach
(
const
MessageItem
::
Tag
*
tag
,
getTagList
())
{
const
auto
tagList
{
getTagList
()};
for
(
const
MessageItem
::
Tag
*
tag
:
tagList
)
{
if
(
!
best
||
tag
->
priority
()
<
best
->
priority
())
{
best
=
tag
;
}
...
...
@@ -285,7 +286,8 @@ void MessageItem::editAnnotation(QWidget *parent)
const
MessageItem
::
Tag
*
MessageItemPrivate
::
findTagInternal
(
const
QString
&
szTagId
)
const
{
foreach
(
const
MessageItem
::
Tag
*
tag
,
getTagList
())
{
const
auto
tagList
{
getTagList
()};
for
(
const
MessageItem
::
Tag
*
tag
:
tagList
)
{
if
(
tag
->
id
()
==
szTagId
)
{
return
tag
;
}
...
...
@@ -723,7 +725,8 @@ void TagCache::onTagsFetched(KJob *job)
return
;
}
auto
fetchJob
=
static_cast
<
Akonadi
::
TagFetchJob
*>
(
job
);
Q_FOREACH
(
const
Akonadi
::
Tag
&
tag
,
fetchJob
->
tags
())
{
const
auto
tags
{
fetchJob
->
tags
()};
for
(
const
Akonadi
::
Tag
&
tag
:
tags
)
{
mCache
.
insert
(
tag
.
id
(),
new
Akonadi
::
Tag
(
tag
));
}
if
(
auto
m
=
mRequests
.
take
(
fetchJob
))
{
...
...
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