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
KDE PIM Runtime
Commits
f3029493
Commit
f3029493
authored
Aug 01, 2020
by
Laurent Montel
😁
Browse files
Minor optimization
parent
ccbca148
Pipeline
#29201
failed with stage
in 38 minutes and 41 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
resources/mbox/mboxresource.cpp
View file @
f3029493
...
...
@@ -73,6 +73,7 @@ MboxResource::MboxResource(const QString &id)
setSupportedMimetypes
(
mimeTypes
,
QStringLiteral
(
"message-rfc822"
));
// Register the list of deleted items as an attribute of the collection.
AttributeFactory
::
registerAttribute
<
DeletedItemsAttribute
>
();
setName
(
mSettings
->
displayName
());
}
MboxResource
::~
MboxResource
()
...
...
@@ -103,8 +104,7 @@ void MboxResource::retrieveItems(const Akonadi::Collection &col)
reloadFile
();
KMBox
::
MBoxEntry
::
List
entryList
;
if
(
col
.
hasAttribute
<
DeletedItemsAttribute
>
())
{
const
DeletedItemsAttribute
*
attr
=
col
.
attribute
<
DeletedItemsAttribute
>
();
if
(
const
DeletedItemsAttribute
*
attr
=
col
.
attribute
<
DeletedItemsAttribute
>
())
{
entryList
=
mMBox
->
entries
(
attr
->
deletedItemEntries
());
}
else
{
// No deleted items (yet)
entryList
=
mMBox
->
entries
();
...
...
@@ -113,8 +113,8 @@ void MboxResource::retrieveItems(const Akonadi::Collection &col)
// readEntryHeaders() call.
Item
::
List
items
;
QString
colId
=
QString
::
number
(
col
.
id
());
QString
colRid
=
col
.
remoteId
();
const
QString
colId
=
QString
::
number
(
col
.
id
());
const
QString
colRid
=
col
.
remoteId
();
double
count
=
1
;
const
int
entryListSize
(
entryList
.
size
());
items
.
reserve
(
entryListSize
);
...
...
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