Commit ed53f83b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Const'ify variables

parent cf85e066
Pipeline #46441 canceled with stage
......@@ -840,7 +840,7 @@ bool MessageFactoryNG::MDNReturnPathEmpty(const KMime::Message::Ptr &msg)
// SHOULD be obtained (or no MDN sent) if there is no Return-Path
// header in the message [...]
KMime::Types::AddrSpecList returnPathList = MessageHelper::extractAddrSpecs(msg, "Return-Path");
QString returnPath = returnPathList.isEmpty() ? QString()
const QString returnPath = returnPathList.isEmpty() ? QString()
: returnPathList.front().localPart + QChar::fromLatin1('@') + returnPathList.front().domain;
qCDebug(MESSAGECOMPOSER_LOG) << "clean return path:" << returnPath;
return returnPath.isEmpty();
......@@ -864,7 +864,7 @@ bool MessageFactoryNG::MDNReturnPathNotInRecieptTo(const KMime::Message::Ptr &ms
// SHOULD be obtained (or no MDN sent) if there is no Return-Path
// header in the message [...]
KMime::Types::AddrSpecList returnPathList = MessageHelper::extractAddrSpecs(msg, QStringLiteral("Return-Path").toLatin1());
QString returnPath = returnPathList.isEmpty() ? QString()
const QString returnPath = returnPathList.isEmpty() ? QString()
: returnPathList.front().localPart + QChar::fromLatin1('@') + returnPathList.front().domain;
qCDebug(MESSAGECOMPOSER_LOG) << "clean return path:" << returnPath;
return !receiptTo.contains(returnPath, Qt::CaseSensitive);
......
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