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
Akonadi Contacts
Commits
2914eef8
Commit
2914eef8
authored
Dec 19, 2016
by
Laurent Montel
Browse files
port to for(... : ...)
parent
7c68aa0c
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/editor/customfieldeditor/customfieldslistwidget.cpp
View file @
2914eef8
...
...
@@ -149,7 +149,7 @@ void CustomFieldsListWidget::loadContact(const KContacts::Addressee &contact)
void
CustomFieldsListWidget
::
storeContact
(
KContacts
::
Addressee
&
contact
)
const
{
const
CustomField
::
List
customFields
=
mModel
->
customFields
();
for
each
(
const
CustomField
&
customField
,
customFields
)
{
for
(
const
CustomField
&
customField
:
customFields
)
{
// write back values for local and global scope, leave external untouched
if
(
customField
.
scope
()
!=
CustomField
::
ExternalScope
)
{
if
(
!
customField
.
value
().
isEmpty
())
{
...
...
@@ -213,7 +213,7 @@ void CustomFieldsListWidget::setLocalCustomFieldDescriptions(const QVariantList
{
mLocalCustomFields
.
clear
();
mLocalCustomFields
.
reserve
(
descriptions
.
count
());
for
each
(
const
QVariant
&
description
,
descriptions
)
{
for
(
const
QVariant
&
description
:
descriptions
)
{
mLocalCustomFields
.
append
(
CustomField
::
fromVariantMap
(
description
.
toMap
(),
CustomField
::
LocalScope
));
}
}
...
...
@@ -223,7 +223,7 @@ QVariantList CustomFieldsListWidget::localCustomFieldDescriptions() const
const
CustomField
::
List
customFields
=
mModel
->
customFields
();
QVariantList
descriptions
;
for
each
(
const
CustomField
&
field
,
customFields
)
{
for
(
const
CustomField
&
field
:
customFields
)
{
if
(
field
.
scope
()
==
CustomField
::
LocalScope
)
{
descriptions
.
append
(
field
.
toVariantMap
());
}
...
...
src/editor/widgets/imagewidget.cpp
View file @
2914eef8
...
...
@@ -325,7 +325,7 @@ void ImageWidget::saveImage()
{
const
QList
<
QByteArray
>
supportedImage
=
QImageWriter
::
supportedImageFormats
();
QString
filter
;
Q_FOREACH
(
const
QByteArray
&
ba
,
supportedImage
)
{
for
(
const
QByteArray
&
ba
:
supportedImage
)
{
if
(
!
filter
.
isEmpty
())
{
filter
+=
QLatin1Char
(
' '
);
}
...
...
src/standardcontactformatter.cpp
View file @
2914eef8
...
...
@@ -228,7 +228,7 @@ QString StandardContactFormatter::toHtml(HtmlForm form) const
if
(
!
rawContact
.
customs
().
empty
())
{
const
QStringList
customs
=
rawContact
.
customs
();
for
each
(
QString
custom
,
customs
)
{
//krazy:exclude=foreach
for
(
QString
custom
:
customs
)
{
if
(
custom
.
startsWith
(
QStringLiteral
(
"KADDRESSBOOK-"
)))
{
custom
.
remove
(
QStringLiteral
(
"KADDRESSBOOK-X-"
));
custom
.
remove
(
QStringLiteral
(
"KADDRESSBOOK-"
));
...
...
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