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
bd47cf9e
Commit
bd47cf9e
authored
Feb 15, 2016
by
Sergio Martins
Committed by
Sergio Martins
Feb 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use QList::reserve() [Wclazy-reserve-candidates]
parent
69d529b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
kaddressbookgrantlee/src/printing/contactgrantleeprintobject.cpp
...sbookgrantlee/src/printing/contactgrantleeprintobject.cpp
+7
-2
No files found.
kaddressbookgrantlee/src/printing/contactgrantleeprintobject.cpp
View file @
bd47cf9e
...
...
@@ -37,10 +37,15 @@ ContactGrantleePrintObject::ContactGrantleePrintObject(const KContacts::Addresse
:
QObject
(
parent
),
mAddress
(
address
)
{
Q_FOREACH
(
const
KContacts
::
Address
&
addr
,
address
.
addresses
())
{
const
auto
addresses
=
address
.
addresses
();
mListAddress
.
reserve
(
addresses
.
size
());
Q_FOREACH
(
const
KContacts
::
Address
&
addr
,
addresses
)
{
mListAddress
<<
new
ContactGrantleePrintAddressObject
(
addr
);
}
Q_FOREACH
(
const
KContacts
::
PhoneNumber
&
phone
,
address
.
phoneNumbers
())
{
const
auto
phoneNumbers
=
address
.
phoneNumbers
();
mListPhones
.
reserve
(
phoneNumbers
.
size
());
Q_FOREACH
(
const
KContacts
::
PhoneNumber
&
phone
,
phoneNumbers
)
{
mListPhones
<<
new
ContactGrantleePrintPhoneObject
(
phone
);
}
const
QStringList
customs
=
mAddress
.
customs
();
...
...
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