Commit 32d20cd1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port some code to for(...:...)

parent 42d70a00
......@@ -232,7 +232,8 @@ void ComposerPrivate::composeStep2()
}
if (encrypt) {
foreach (ContentJobBase *eJob, createEncryptJobs(mainJob, false)) {
const auto lstJob = createEncryptJobs(mainJob, false);
for (ContentJobBase *eJob : lstJob) {
QObject::connect(eJob, SIGNAL(finished(KJob*)), q, SLOT(contentJobFinished(KJob*)));
q->addSubjob(eJob);
mainJob = eJob; //start only last EncryptJob
......
......@@ -185,7 +185,8 @@ void SkeletonMessageJobPrivate::doStart()
}
// Extras
foreach (KMime::Headers::Base *extra, infoPart->extraHeaders()) {
const KMime::Headers::Base::List extraHeaders = infoPart->extraHeaders();
for (KMime::Headers::Base *extra : extraHeaders) {
message->setHeader(extra);
}
......
......@@ -41,7 +41,7 @@ KMime::Content *MimeTreeParser::findTypeInDirectChilds(KMime::Content *content,
return content;
}
foreach (auto child, content->contents()) {
foreach (const auto child, content->contents()) {
if ((!child->contentType()->isEmpty())
&& (mimeType == child->contentType()->mimeType())) {
return child;
......
......@@ -198,7 +198,8 @@ void MessagePart::parseInternal(KMime::Content *node, bool onlyOneMimePart)
{
auto subMessagePart = mOtp->parseObjectTreeInternal(node, onlyOneMimePart);
d->mRoot = subMessagePart->isRoot();
foreach (const auto &part, subMessagePart->subParts()) {
const QVector<MessagePart::Ptr> subParts = subMessagePart->subParts();
for (const auto &part : subParts) {
appendSubPart(part);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment