From 5bdfa6a5dd99565915f14f69b7c39958631c7b86 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Wed, 13 Jun 2018 16:51:16 +0200 Subject: [PATCH] fix Qt version check QT_VERSION_MAJOR, not QT_MAJOR_VERSION, and fixed stray #elif --- src/mimemessage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mimemessage.cpp b/src/mimemessage.cpp index 442faf8..2460abf 100644 --- a/src/mimemessage.cpp +++ b/src/mimemessage.cpp @@ -294,9 +294,9 @@ QString MimeMessage::toString() mime += "References: <" + mInReplyTo + ">\r\n"; } -#if QT_MAJOR_VERSION < 5 //Qt4 workaround since RFC2822Date isn't defined +#if QT_VERSION_MAJOR < 5 //Qt4 workaround since RFC2822Date isn't defined mime += QString("Date: %1\r\n").arg(QDateTime::currentDateTime().toString("dd MMM yyyy hh:mm:ss +/-TZ")); -#elif //Qt5 supported +#else //Qt5 supported mime += QString("Date: %1\r\n").arg(QDateTime::currentDateTime().toString(Qt::RFC2822Date)); #endif //support RFC2822Date