mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-16 12:07:47 -07:00
replace foreach macro with standard for each loop (#5485)
This commit is contained in:
parent
0cbad25385
commit
c148c8df7f
17 changed files with 31 additions and 31 deletions
|
|
@ -172,7 +172,7 @@ void QxtMailMessage::setExtraHeaders(const QHash<QString, QString> &a)
|
|||
{
|
||||
QHash<QString, QString> &headers = qxt_d->extraHeaders;
|
||||
headers.clear();
|
||||
foreach (const QString &key, a.keys()) {
|
||||
for (const QString &key : a.keys()) {
|
||||
headers[key.toLower()] = a[key];
|
||||
}
|
||||
}
|
||||
|
|
@ -219,7 +219,7 @@ QByteArray qxt_fold_mime_header(const QString &key, const QString &value, const
|
|||
line += prefix;
|
||||
if (!value.contains("=?") && isASCII(value)) {
|
||||
bool firstWord = true;
|
||||
foreach (const QByteArray &word, value.toLatin1().split(' ')) {
|
||||
for (const QByteArray &word : value.toLatin1().split(' ')) {
|
||||
if (line.size() > 78) {
|
||||
rv = rv + line + "\r\n";
|
||||
line.clear();
|
||||
|
|
@ -339,7 +339,7 @@ QByteArray QxtMailMessage::rfc2822() const
|
|||
}
|
||||
}
|
||||
|
||||
foreach (const QString &r, qxt_d->extraHeaders.keys()) {
|
||||
for (const QString &r : qxt_d->extraHeaders.keys()) {
|
||||
if ((r.toLower() == "content-type" || r.toLower() == "content-transfer-encoding") && attach.count()) {
|
||||
// Since we're in multipart mode, we'll be outputting this later
|
||||
continue;
|
||||
|
|
@ -463,7 +463,7 @@ QByteArray QxtMailMessage::rfc2822() const
|
|||
}
|
||||
|
||||
if (attach.count()) {
|
||||
foreach (const QString &filename, attach.keys()) {
|
||||
for (const QString &filename : attach.keys()) {
|
||||
rv += "--" + qxt_d->boundary + "\r\n";
|
||||
rv +=
|
||||
qxt_fold_mime_header("Content-Disposition", QDir(filename).dirName(), "attachment; filename=");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue