Changeset View
Changeset View
Standalone View
Standalone View
src/fetchjob.cpp
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Line(s) | |||||
128 | 128 | | |||
129 | FetchJob::~FetchJob() | 129 | FetchJob::~FetchJob() | ||
130 | { | 130 | { | ||
131 | } | 131 | } | ||
132 | 132 | | |||
133 | void FetchJob::setSequenceSet(const ImapSet &set) | 133 | void FetchJob::setSequenceSet(const ImapSet &set) | ||
134 | { | 134 | { | ||
135 | Q_D(FetchJob); | 135 | Q_D(FetchJob); | ||
136 | Q_ASSERT(!set.toImapSequenceSet().trimmed().isEmpty()); | 136 | Q_ASSERT(!set.isEmpty()); | ||
137 | d->set = set; | 137 | d->set = set; | ||
138 | } | 138 | } | ||
139 | 139 | | |||
140 | ImapSet FetchJob::sequenceSet() const | 140 | ImapSet FetchJob::sequenceSet() const | ||
141 | { | 141 | { | ||
142 | Q_D(const FetchJob); | 142 | Q_D(const FetchJob); | ||
143 | return d->set; | 143 | return d->set; | ||
144 | } | 144 | } | ||
Show All 39 Lines | 183 | { | |||
184 | Q_D(const FetchJob); | 184 | Q_D(const FetchJob); | ||
185 | return d->selectedMailBox; | 185 | return d->selectedMailBox; | ||
186 | } | 186 | } | ||
187 | 187 | | |||
188 | void FetchJob::doStart() | 188 | void FetchJob::doStart() | ||
189 | { | 189 | { | ||
190 | Q_D(FetchJob); | 190 | Q_D(FetchJob); | ||
191 | 191 | | |||
192 | d->set.optimize(); | ||||
192 | QByteArray parameters = d->set.toImapSequenceSet() + ' '; | 193 | QByteArray parameters = d->set.toImapSequenceSet() + ' '; | ||
193 | Q_ASSERT(!parameters.trimmed().isEmpty()); | 194 | Q_ASSERT(!parameters.trimmed().isEmpty()); | ||
194 | 195 | | |||
195 | switch (d->scope.mode) { | 196 | switch (d->scope.mode) { | ||
196 | case FetchScope::Headers: | 197 | case FetchScope::Headers: | ||
197 | if (d->scope.parts.isEmpty()) { | 198 | if (d->scope.parts.isEmpty()) { | ||
198 | parameters += "(RFC822.SIZE INTERNALDATE BODY.PEEK[HEADER.FIELDS (TO FROM MESSAGE-ID REFERENCES IN-REPLY-TO SUBJECT DATE)] FLAGS UID"; | 199 | parameters += "(RFC822.SIZE INTERNALDATE BODY.PEEK[HEADER.FIELDS (TO FROM MESSAGE-ID REFERENCES IN-REPLY-TO SUBJECT DATE)] FLAGS UID"; | ||
199 | } else { | 200 | } else { | ||
▲ Show 20 Lines • Show All 409 Lines • Show Last 20 Lines |