Commit d99167a1 authored by Laurent Montel's avatar Laurent Montel 😁

Port some foreach

parent 2bdabfd8
......@@ -80,7 +80,9 @@ void SearchCollectionIndexingWarning::setCollection(const Akonadi::Collection &c
Akonadi::PersistentSearchAttribute *attr = collection.attribute<Akonadi::PersistentSearchAttribute>();
Akonadi::Collection::List cols;
Q_FOREACH (qint64 col, attr->queryCollections()) {
const QVector<qint64> queryCols = attr->queryCollections();
cols.reserve(queryCols.count());
for (qint64 col : queryCols) {
cols.push_back(Akonadi::Collection(col));
}
if (cols.isEmpty()) {
......
......@@ -1924,7 +1924,7 @@ QString ViewerPrivate::renderAttachments(KMime::Content *node, const QColor &bgC
}
}
Q_FOREACH (KMime::Content *extraNode, mNodeHelper->extraContents(node)) {
for (KMime::Content *extraNode : mNodeHelper->extraContents(node)) {
html += renderAttachments(extraNode, bgColor);
}
......
......@@ -124,7 +124,7 @@ void VerifyDataBaseUpdateTest::shouldVerifyCheckSums()
QByteArray newSsha256;
std::sort(itemToStore.begin(), itemToStore.end(), WebEngineViewer::Addition::lessThan);
Q_FOREACH (const WebEngineViewer::Addition &add, itemToStore) {
for (const WebEngineViewer::Addition &add : qAsConst(itemToStore)) {
QByteArray ba = add.hashString;
newSsha256 += ba;
}
......
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