Fixed Qt4 compilation for version 1.1. Works with MSVC2013. (#62)
This commit is contained in:
parent
ca43f9d642
commit
81c652dc73
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/* [1] Constructors and Destructors */
|
/* [1] Constructors and Destructors */
|
||||||
MimeMessage::MimeMessage(bool createAutoMimeContent) :
|
MimeMessage::MimeMessage(bool createAutoMimeContent) :
|
||||||
replyTo(Q_NULLPTR),
|
replyTo(nullptr),
|
||||||
hEncoding(MimePart::_8Bit)
|
hEncoding(MimePart::_8Bit)
|
||||||
{
|
{
|
||||||
if (createAutoMimeContent)
|
if (createAutoMimeContent)
|
||||||
@ -293,7 +293,12 @@ QString MimeMessage::toString()
|
|||||||
mime += "In-Reply-To: <" + mInReplyTo + ">\r\n";
|
mime += "In-Reply-To: <" + mInReplyTo + ">\r\n";
|
||||||
mime += "References: <" + mInReplyTo + ">\r\n";
|
mime += "References: <" + mInReplyTo + ">\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_MAJOR_VERSION < 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
|
||||||
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
|
||||||
|
|
||||||
mime += content->toString();
|
mime += content->toString();
|
||||||
return mime;
|
return mime;
|
||||||
|
Loading…
Reference in New Issue
Block a user