diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-09-14 10:16:33 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-09-15 16:14:19 +0200 |
commit | 25fdab9836b1fdd248d3d36c00a96740093cd749 (patch) | |
tree | db9df043cadf90a7c27c43bab7217afda91db023 /examples/imapresource/tests/imapserverproxytest.cpp | |
parent | 2bfccc6301f71db5bf45977bb2955c04fa6c1605 (diff) | |
download | sink-25fdab9836b1fdd248d3d36c00a96740093cd749.tar.gz sink-25fdab9836b1fdd248d3d36c00a96740093cd749.zip |
New kimap2 syntax
Diffstat (limited to 'examples/imapresource/tests/imapserverproxytest.cpp')
-rw-r--r-- | examples/imapresource/tests/imapserverproxytest.cpp | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/examples/imapresource/tests/imapserverproxytest.cpp b/examples/imapresource/tests/imapserverproxytest.cpp index 21c2248..1bd5982 100644 --- a/examples/imapresource/tests/imapserverproxytest.cpp +++ b/examples/imapresource/tests/imapserverproxytest.cpp | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | using namespace Imap; | 13 | using namespace Imap; |
14 | 14 | ||
15 | SINK_DEBUG_AREA("imapserverproxytest") | 15 | // SINK_DEBUG_AREA("imapserverproxytest") |
16 | 16 | ||
17 | /** | 17 | /** |
18 | */ | 18 | */ |
@@ -77,15 +77,8 @@ private slots: | |||
77 | scope.mode = KIMAP2::FetchJob::FetchScope::Headers; | 77 | scope.mode = KIMAP2::FetchJob::FetchScope::Headers; |
78 | int count = 0; | 78 | int count = 0; |
79 | auto job = imap.select("INBOX.test").then<void>(imap.fetch(KIMAP2::ImapSet::fromImapSequenceSet("1:*"), scope, | 79 | auto job = imap.select("INBOX.test").then<void>(imap.fetch(KIMAP2::ImapSet::fromImapSequenceSet("1:*"), scope, |
80 | [&count](const QString &mailbox, | 80 | [&count](const KIMAP2::FetchJob::Result &) { |
81 | const QMap<qint64,qint64> &uids, | 81 | count++; |
82 | const QMap<qint64,qint64> &sizes, | ||
83 | const QMap<qint64,KIMAP2::MessageAttribute> &attrs, | ||
84 | const QMap<qint64,KIMAP2::MessageFlags> &flags, | ||
85 | const QMap<qint64,KIMAP2::MessagePtr> &messages) { | ||
86 | SinkTrace() << "Received " << uids.size() << " messages from " << mailbox; | ||
87 | SinkTrace() << uids.size() << sizes.size() << attrs.size() << flags.size() << messages.size(); | ||
88 | count += uids.size(); | ||
89 | })); | 82 | })); |
90 | 83 | ||
91 | VERIFYEXEC(job); | 84 | VERIFYEXEC(job); |
@@ -102,15 +95,8 @@ private slots: | |||
102 | scope.mode = KIMAP2::FetchJob::FetchScope::Headers; | 95 | scope.mode = KIMAP2::FetchJob::FetchScope::Headers; |
103 | int count = 0; | 96 | int count = 0; |
104 | auto job = imap.select("INBOX.test").then<void>(imap.fetch(KIMAP2::ImapSet::fromImapSequenceSet("1:*"), scope, | 97 | auto job = imap.select("INBOX.test").then<void>(imap.fetch(KIMAP2::ImapSet::fromImapSequenceSet("1:*"), scope, |
105 | [&count](const QString &mailbox, | 98 | [&count](const KIMAP2::FetchJob::Result &) { |
106 | const QMap<qint64,qint64> &uids, | 99 | count++; |
107 | const QMap<qint64,qint64> &sizes, | ||
108 | const QMap<qint64,KIMAP2::MessageAttribute> &attrs, | ||
109 | const QMap<qint64,KIMAP2::MessageFlags> &flags, | ||
110 | const QMap<qint64,KIMAP2::MessagePtr> &messages) { | ||
111 | SinkTrace() << "Received " << uids.size() << " messages from " << mailbox; | ||
112 | SinkTrace() << uids.size() << sizes.size() << attrs.size() << flags.size() << messages.size(); | ||
113 | count += uids.size(); | ||
114 | })); | 100 | })); |
115 | 101 | ||
116 | VERIFYEXEC(job); | 102 | VERIFYEXEC(job); |