Merge pull request #71 from mabrand/fix-date-field

fix Qt version check
This commit is contained in:
Attila Tőkés 2018-06-13 19:41:22 +03:00 committed by GitHub
commit 1f4f2e208b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -294,9 +294,9 @@ QString MimeMessage::toString()
mime += "References: <" + mInReplyTo + ">\r\n"; 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")); 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)); mime += QString("Date: %1\r\n").arg(QDateTime::currentDateTime().toString(Qt::RFC2822Date));
#endif //support RFC2822Date #endif //support RFC2822Date