]>
Commit | Line | Data |
---|---|---|
44402c54 AM |
1 | From ccd67f3e65c9ffe32858ca521aa1e56a42b026af Mon Sep 17 00:00:00 2001 |
2 | From: Volker Krause <vkrause@kde.org> | |
3 | Date: Tue, 20 Sep 2011 10:12:40 +0200 | |
4 | Subject: [PATCH] Ignore items with empty remote ids here. | |
5 | ||
6 | Items with empty remote id are those not yet stored by the resource, | |
7 | ie. we still have pending change replays for those. So, if we do a sync | |
8 | during that period (which could happen since the introduction of the | |
9 | file system watcher), we would remove a random one of those (only one | |
10 | since the map would only contain one without a remote id). This mostly | |
11 | affects the POP3 usage pattern. | |
12 | (cherry picked from commit f814b46a799ea8418ae17cf77d44da473124d12d) | |
13 | --- | |
14 | resources/maildir/retrieveitemsjob.cpp | 6 ++++-- | |
15 | 1 files changed, 4 insertions(+), 2 deletions(-) | |
16 | ||
17 | diff --git a/resources/maildir/retrieveitemsjob.cpp b/resources/maildir/retrieveitemsjob.cpp | |
18 | index 7253f7e..f0273ef 100644 | |
19 | --- a/resources/maildir/retrieveitemsjob.cpp | |
20 | +++ b/resources/maildir/retrieveitemsjob.cpp | |
21 | @@ -57,8 +57,10 @@ void RetrieveItemsJob::localListDone ( KJob* job ) | |
22 | ||
23 | const Akonadi::Item::List items = qobject_cast<Akonadi::ItemFetchJob*>( job )->items(); | |
24 | m_localItems.reserve( items.size() ); | |
25 | - foreach ( const Akonadi::Item &item, items ) | |
26 | - m_localItems.insert( item.remoteId(), item ); | |
27 | + foreach ( const Akonadi::Item &item, items ) { | |
28 | + if ( !item.remoteId().isEmpty() ) | |
29 | + m_localItems.insert( item.remoteId(), item ); | |
30 | + } | |
31 | ||
32 | const QStringList entryList = m_maildir.entryList(); | |
33 | qint64 previousMtime = m_collection.remoteRevision().toLongLong(); | |
34 | -- | |
35 | 1.7.1 | |
36 |