Convert all foreach() to range-based for()

This commit is contained in:
thalieht 2018-11-18 20:40:37 +02:00 committed by sledgehammer999
parent 62e71a15a4
commit e2ee928017
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2
64 changed files with 326 additions and 292 deletions

View file

@ -43,6 +43,7 @@
#include <QTcpSocket>
#endif
#include "base/global.h"
#include "base/logger.h"
#include "base/preferences.h"
@ -291,7 +292,7 @@ QByteArray Smtp::encodeMimeHeader(const QString &key, const QString &value, QTex
if (!prefix.isEmpty()) line += prefix;
if (!value.contains("=?") && latin1->canEncode(value)) {
bool firstWord = true;
foreach (const QByteArray &word, value.toLatin1().split(' ')) {
for (const QByteArray &word : copyAsConst(value.toLatin1().split(' '))) {
if (line.size() > 78) {
rv = rv + line + "\r\n";
line.clear();