Commit 1c4d27d0 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use for(...:...)

parent 820f2e2d
......@@ -963,7 +963,7 @@ void AttachmentControllerBase::addAttachment(const QUrl &url)
void AttachmentControllerBase::addAttachments(const QList<QUrl> &urls)
{
foreach (const QUrl &url, urls) {
for (const QUrl &url : urls) {
addAttachment(url);
}
}
......
......@@ -22,6 +22,7 @@
//#define MESSAGEVIEWER_READER_HTML_DEBUG 1
#include "viewer_p.h"
#include "viewer.h"
#include "helper_p.h"
#include "messageviewer_debug.h"
#include "utils/mimetype.h"
#include "viewer/objecttreeemptysource.h"
......@@ -2985,7 +2986,7 @@ void ViewerPrivate::slotMessageRendered()
mPreviouslyViewedItem = mMessageItem.id();
foreach (AbstractMessageLoadedHandler *handler, mMessageLoadedHandlers) {
for (AbstractMessageLoadedHandler *handler : qAsConst(mMessageLoadedHandlers)) {
handler->setItem(mMessageItem);
}
}
......
......@@ -94,7 +94,7 @@ void VerifyDataBaseUpdateTest::shouldVerifyCheckSums_data()
void VerifyDataBaseUpdateTest::shouldVerifyCheckSums()
{
QFETCH(QList<WebEngineViewer::Addition>, additionList);
QFETCH(const QList<WebEngineViewer::Addition>, additionList);
QFETCH(int, numberOfItems);
QFETCH(QByteArray, calculateCheckSums);
......@@ -107,7 +107,7 @@ void VerifyDataBaseUpdateTest::shouldVerifyCheckSums()
// "x\x18\xbdn]\xa5\xa8R\xf7\xab\xcf\xc1\xa3\xa3\xc5Z,\xa6o"
QList<WebEngineViewer::Addition> itemToStore;
Q_FOREACH (const WebEngineViewer::Addition &add, additionList) {
for (const WebEngineViewer::Addition &add : additionList) {
const QByteArray uncompressed = add.hashString;
for (int i = 0; i < uncompressed.size();) {
const QByteArray m = uncompressed.mid(i, add.prefixSize);
......
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