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