Commit 9ce865a6 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make compile against qt5.15

parent af10cbc9
......@@ -22,6 +22,13 @@
#include "messageviewer_dkimcheckerdebug.h"
#include <QRegularExpressionMatch>
auto returnEndLine() {
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
return endl;
#else
return Qt::endl;
#endif
}
using namespace MessageViewer;
//see https://tools.ietf.org/html/rfc7601
DKIMAuthenticationStatusInfo::DKIMAuthenticationStatusInfo()
......@@ -225,28 +232,28 @@ QDebug operator <<(QDebug d, const DKIMAuthenticationStatusInfo &t)
{
d << "mAuthservId: " << t.authservId();
d << "mReasonSpec: " << t.reasonSpec();
d << "mAuthVersion: " << t.authVersion() << endl;
d << "mAuthVersion: " << t.authVersion() << returnEndLine();
for (const DKIMAuthenticationStatusInfo::AuthStatusInfo &info : t.listAuthStatusInfo()) {
d << "mListAuthStatusInfo: " << info.method << " : " << info.result << " : " << info.methodVersion << " : " << info.reason << endl;
d << "Property:" << endl;
d << "mListAuthStatusInfo: " << info.method << " : " << info.result << " : " << info.methodVersion << " : " << info.reason << returnEndLine();
d << "Property:" << returnEndLine();
if (!info.smtp.isEmpty()) {
for (const DKIMAuthenticationStatusInfo::AuthStatusInfo::Property &prop : info.smtp) {
d << " smtp " << prop.type << " : " << prop.value << endl;
d << " smtp " << prop.type << " : " << prop.value << returnEndLine();
}
}
if (!info.header.isEmpty()) {
for (const DKIMAuthenticationStatusInfo::AuthStatusInfo::Property &prop : info.header) {
d << " header " << prop.type << " : " << prop.value << endl;
d << " header " << prop.type << " : " << prop.value << returnEndLine();
}
}
if (!info.body.isEmpty()) {
for (const DKIMAuthenticationStatusInfo::AuthStatusInfo::Property &prop : info.body) {
d << " body " << prop.type << " : " << prop.value << endl;
d << " body " << prop.type << " : " << prop.value << returnEndLine();
}
}
if (!info.policy.isEmpty()) {
for (const DKIMAuthenticationStatusInfo::AuthStatusInfo::Property &prop : info.policy) {
d << " policy " << prop.type << " : " << prop.value << endl;
d << " policy " << prop.type << " : " << prop.value << returnEndLine();
}
}
}
......
......@@ -82,7 +82,13 @@ QIODevice *FileHtmlWriter::device() const
void FileHtmlWriter::embedPart(const QByteArray &contentId, const QString &url)
{
*stream() << "<!-- embedPart(contentID=" << contentId << ", url=" << url << ") -->" << endl;
*stream() << "<!-- embedPart(contentID=" << contentId << ", url=" << url << ") -->"
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
<< endl
#else
<< Qt::endl
#endif
;
}
void FileHtmlWriter::extraHead(const QString &)
......
......@@ -46,7 +46,12 @@ MessagePart::Ptr MultiPartSignedBodyPartFormatter::process(Interface::BodyPart &
{
KMime::Content *node = part.content();
if (node->contents().size() != 2) {
qCDebug(MIMETREEPARSER_LOG) << "mulitpart/signed must have exactly two child parts!" << endl
qCDebug(MIMETREEPARSER_LOG) << "mulitpart/signed must have exactly two child parts!"
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
<< endl
#else
<< Qt::endl
#endif
<< "processing as multipart/mixed";
if (!node->contents().isEmpty()) {
return MessagePart::Ptr(new MimeMessagePart(part.objectTreeParser(), node->contents().at(0), false));
......
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