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

USe QByteArrayLiteral

parent bf0d09cd
......@@ -183,10 +183,10 @@ QByteArray Request::headerFields(const QString &fromRealName) const
result += "Subject: " + formatSubject(subject()) + "\r\n";
}
if (!to().empty()) {
result += QByteArray("To: ") + to().join(QStringLiteral(",\r\n\t") /* line folding */).toLatin1() + "\r\n";
result += QByteArrayLiteral("To: ") + to().join(QStringLiteral(",\r\n\t") /* line folding */).toLatin1() + "\r\n";
}
if (!cc().empty()) {
result += QByteArray("Cc: ") + cc().join(QStringLiteral(",\r\n\t") /* line folding */).toLatin1() + "\r\n";
result += QByteArrayLiteral("Cc: ") + cc().join(QStringLiteral(",\r\n\t") /* line folding */).toLatin1() + "\r\n";
}
return result;
}
......
......@@ -81,7 +81,7 @@ void DispatchModeAttribute::deserialize(const QByteArray &data)
d->mMode = Automatic;
} else if (data == "never") {
d->mMode = Manual;
} else if (data.startsWith(QByteArray("after"))) {
} else if (data.startsWith(QByteArrayLiteral("after"))) {
d->mMode = Automatic;
d->mDueDate = QDateTime::fromString(QString::fromLatin1(data.mid(5)), Qt::ISODate);
// NOTE: 5 is the strlen of "after".
......
......@@ -91,7 +91,7 @@ void SentBehaviourAttribute::deserialize(const QByteArray &data)
d->mBehaviour = Delete;
} else if (attr0 == "moveToDefault") {
d->mBehaviour = MoveToDefaultSentCollection;
} else if (attr0.startsWith(QByteArray("moveTo"))) {
} else if (attr0.startsWith(QByteArrayLiteral("moveTo"))) {
d->mBehaviour = MoveToCollection;
d->mMoveToCollection = Akonadi::Collection(attr0.mid(6).toLongLong());
// NOTE: 6 is the strlen of "moveTo".
......
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