summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-04-08 16:05:25 +0200
committerMontel Laurent <[email protected]>2017-04-08 16:05:25 +0200
commita6a1aed2e505cd316c29a52873501aae464effdb (patch)
tree17012b14c7878e288eb355fd7d2f986e4af0f03c
parentbf0d09cd50f848a33a5abfe06ca6babd5cfeca51 (diff)
USe QByteArrayLiteral
-rw-r--r--kioslave/src/smtp/request.cpp4
-rw-r--r--src/kmailtransportakonadi/dispatchmodeattribute.cpp2
-rw-r--r--src/kmailtransportakonadi/sentbehaviourattribute.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/kioslave/src/smtp/request.cpp b/kioslave/src/smtp/request.cpp
index 5d61258..cedacd4 100644
--- a/kioslave/src/smtp/request.cpp
+++ b/kioslave/src/smtp/request.cpp
@@ -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;
}
diff --git a/src/kmailtransportakonadi/dispatchmodeattribute.cpp b/src/kmailtransportakonadi/dispatchmodeattribute.cpp
index 3097935..795af8f 100644
--- a/src/kmailtransportakonadi/dispatchmodeattribute.cpp
+++ b/src/kmailtransportakonadi/dispatchmodeattribute.cpp
@@ -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".
diff --git a/src/kmailtransportakonadi/sentbehaviourattribute.cpp b/src/kmailtransportakonadi/sentbehaviourattribute.cpp
index 08de4f9..5e402c3 100644
--- a/src/kmailtransportakonadi/sentbehaviourattribute.cpp
+++ b/src/kmailtransportakonadi/sentbehaviourattribute.cpp
@@ -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".