Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
Mail-related libraries
Commits
f2701413
Commit
f2701413
authored
Dec 18, 2016
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port to for(... : ...)
parent
06bd1e04
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
28 deletions
+24
-28
kaddressbookgrantlee/src/formatter/grantleecontactformatter.cpp
...ssbookgrantlee/src/formatter/grantleecontactformatter.cpp
+8
-10
kaddressbookgrantlee/src/printing/contactgrantleeprintobject.cpp
...sbookgrantlee/src/printing/contactgrantleeprintobject.cpp
+11
-13
kaddressbookgrantlee/src/printing/grantleeprint.cpp
kaddressbookgrantlee/src/printing/grantleeprint.cpp
+1
-1
libfollowupreminder/src/followupreminderutil.cpp
libfollowupreminder/src/followupreminderutil.cpp
+3
-3
libsendlater/src/sendlaterutil.cpp
libsendlater/src/sendlaterutil.cpp
+1
-1
No files found.
kaddressbookgrantlee/src/formatter/grantleecontactformatter.cpp
View file @
f2701413
...
...
@@ -322,16 +322,14 @@ QString GrantleeContactFormatter::toHtml(HtmlForm form) const
// IM
QVariantList
imAddresses
;
const
QStringList
customs
=
rawContact
.
customs
();
if
(
!
customs
.
empty
())
{
foreach
(
const
QString
&
custom
,
customs
)
{
if
(
custom
.
startsWith
(
QStringLiteral
(
"messaging/"
)))
{
int
pos
=
custom
.
indexOf
(
QLatin1Char
(
':'
));
QString
key
=
custom
.
left
(
pos
);
key
.
remove
(
QStringLiteral
(
"-All"
));
const
QString
value
=
custom
.
mid
(
pos
+
1
);
imAddresses
.
append
(
imAddressHash
(
key
,
value
));
}
for
(
const
QString
&
custom
:
customs
)
{
if
(
custom
.
startsWith
(
QStringLiteral
(
"messaging/"
)))
{
int
pos
=
custom
.
indexOf
(
QLatin1Char
(
':'
));
QString
key
=
custom
.
left
(
pos
);
key
.
remove
(
QStringLiteral
(
"-All"
));
const
QString
value
=
custom
.
mid
(
pos
+
1
);
imAddresses
.
append
(
imAddressHash
(
key
,
value
));
}
}
...
...
kaddressbookgrantlee/src/printing/contactgrantleeprintobject.cpp
View file @
f2701413
...
...
@@ -41,38 +41,36 @@ ContactGrantleePrintObject::ContactGrantleePrintObject(const KContacts::Addresse
{
const
auto
addresses
=
address
.
addresses
();
mListAddress
.
reserve
(
addresses
.
size
());
Q_FOREACH
(
const
KContacts
::
Address
&
addr
,
addresses
)
{
for
(
const
KContacts
::
Address
&
addr
:
addresses
)
{
mListAddress
<<
new
ContactGrantleeAddressObject
(
addr
);
}
const
auto
webSites
=
address
.
extraUrlList
();
mListWebSite
.
reserve
(
webSites
.
size
());
Q_FOREACH
(
const
KContacts
::
ResourceLocatorUrl
&
webSite
,
webSites
)
{
for
(
const
KContacts
::
ResourceLocatorUrl
&
webSite
:
webSites
)
{
mListWebSite
<<
new
ContactGrantleeWebSite
(
webSite
);
}
const
auto
phoneNumbers
=
address
.
phoneNumbers
();
mListPhones
.
reserve
(
phoneNumbers
.
size
());
Q_FOREACH
(
const
KContacts
::
PhoneNumber
&
phone
,
phoneNumbers
)
{
for
(
const
KContacts
::
PhoneNumber
&
phone
:
phoneNumbers
)
{
mListPhones
<<
new
ContactGrantleePhoneObject
(
phone
);
}
const
auto
emails
=
address
.
emailList
();
mListEmails
.
reserve
(
emails
.
size
());
Q_FOREACH
(
const
KContacts
::
Email
&
email
,
emails
)
{
for
(
const
KContacts
::
Email
&
email
:
emails
)
{
mListEmails
<<
new
ContactGrantleeEmail
(
mAddress
,
email
);
}
const
QStringList
customs
=
mAddress
.
customs
();
if
(
!
customs
.
empty
())
{
Q_FOREACH
(
const
QString
&
custom
,
customs
)
{
if
(
custom
.
startsWith
(
QStringLiteral
(
"messaging/"
)))
{
const
int
pos
=
custom
.
indexOf
(
QLatin1Char
(
':'
));
QString
key
=
custom
.
left
(
pos
);
key
.
remove
(
QStringLiteral
(
"-All"
));
const
QString
value
=
custom
.
mid
(
pos
+
1
);
mListIm
<<
new
ContactGrantleeImObject
(
key
,
value
);
}
for
(
const
QString
&
custom
:
customs
)
{
if
(
custom
.
startsWith
(
QStringLiteral
(
"messaging/"
)))
{
const
int
pos
=
custom
.
indexOf
(
QLatin1Char
(
':'
));
QString
key
=
custom
.
left
(
pos
);
key
.
remove
(
QStringLiteral
(
"-All"
));
const
QString
value
=
custom
.
mid
(
pos
+
1
);
mListIm
<<
new
ContactGrantleeImObject
(
key
,
value
);
}
}
mGeoObject
=
new
ContactGrantleeGeoObject
(
address
.
geo
());
...
...
kaddressbookgrantlee/src/printing/grantleeprint.cpp
View file @
f2701413
...
...
@@ -56,7 +56,7 @@ QString GrantleePrint::contactsToHtml(const KContacts::Addressee::List &contacts
const
int
numberContacts
(
contacts
.
count
());
lst
.
reserve
(
numberContacts
);
contactsList
.
reserve
(
numberContacts
);
Q_FOREACH
(
const
KContacts
::
Addressee
&
address
,
contacts
)
{
for
(
const
KContacts
::
Addressee
&
address
:
contacts
)
{
ContactGrantleePrintObject
*
contactPrintObject
=
new
ContactGrantleePrintObject
(
address
);
lst
.
append
(
contactPrintObject
);
contactsList
<<
QVariant
::
fromValue
(
static_cast
<
QObject
*>
(
contactPrintObject
));
...
...
libfollowupreminder/src/followupreminderutil.cpp
View file @
f2701413
...
...
@@ -70,7 +70,7 @@ void FollowUpReminder::FollowUpReminderUtil::writeFollowupReminderInfo(KSharedCo
const
QString
groupName
=
FollowUpReminder
::
FollowUpReminderUtil
::
followUpReminderPattern
().
arg
(
identifier
);
// first, delete all filter groups:
const
QStringList
filterGroups
=
config
->
groupList
();
for
each
(
const
QString
&
group
,
filterGroups
)
{
for
(
const
QString
&
group
:
filterGroups
)
{
if
(
group
==
groupName
)
{
config
->
deleteGroup
(
group
);
}
...
...
@@ -97,10 +97,10 @@ bool FollowUpReminder::FollowUpReminderUtil::removeFollowupReminderInfo(KSharedC
KConfigGroup
general
=
config
->
group
(
QStringLiteral
(
"General"
));
int
value
=
general
.
readEntry
(
"Number"
,
0
);
Q_FOREACH
(
qint32
identifier
,
listRemove
)
{
for
(
qint32
identifier
:
listRemove
)
{
const
QString
groupName
=
FollowUpReminder
::
FollowUpReminderUtil
::
followUpReminderPattern
().
arg
(
identifier
);
const
QStringList
filterGroups
=
config
->
groupList
();
for
each
(
const
QString
&
group
,
filterGroups
)
{
for
(
const
QString
&
group
:
filterGroups
)
{
if
(
group
==
groupName
)
{
config
->
deleteGroup
(
group
);
...
...
libsendlater/src/sendlaterutil.cpp
View file @
f2701413
...
...
@@ -86,7 +86,7 @@ void SendLater::SendLaterUtil::writeSendLaterInfo(KSharedConfig::Ptr config, Sen
const
QString
groupName
=
SendLater
::
SendLaterUtil
::
sendLaterPattern
().
arg
(
info
->
itemId
());
// first, delete all filter groups:
const
QStringList
filterGroups
=
config
->
groupList
();
for
each
(
const
QString
&
group
,
filterGroups
)
{
for
(
const
QString
&
group
:
filterGroups
)
{
if
(
group
==
groupName
)
{
config
->
deleteGroup
(
group
);
}
...
...
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