Commit d71ea8ab authored by Andrew Branson's avatar Andrew Branson

Merge branch 'empty' into 'master'

[messagingframework] Move contentDisposition into QMailMessagePartContainer, contributes to MER#1579

See merge request !4
parents f1d0cdcb c13c1b2a
......@@ -4798,6 +4798,39 @@ void QMailMessagePartContainer::setBoundary(const QByteArray& text)
impl(this)->setBoundary(text);
}
/*!
Returns the Content-Description header field for the part, if present;
otherwise returns an empty string.
*/
QString QMailMessagePartContainer::contentDescription() const
{
return headerFieldText("Content-Description");
}
/*!
Sets the Content-Description header field for the part to contain \a description.
*/
void QMailMessagePartContainer::setContentDescription(const QString &description)
{
setHeaderField("Content-Description", description);
}
/*!
Returns the Content-Disposition header field for the part.
*/
QMailMessageContentDisposition QMailMessagePartContainer::contentDisposition() const
{
return QMailMessageContentDisposition(headerField("Content-Disposition"));
}
/*!
Sets the Content-Disposition header field for the part to contain \a disposition.
*/
void QMailMessagePartContainer::setContentDisposition(const QMailMessageContentDisposition &disposition)
{
setHeaderField("Content-Disposition", disposition.toString(false, false));
}
/*!
Sets the part to contain the body element \a body, \a encodingStatus describes the current status of \a body regarding encoding.
Note: No encoding/decoding operation will be performed in the body element, only the encoding status flag
......@@ -6023,39 +6056,6 @@ void QMailMessagePart::setContentLocation(const QString &location)
setHeaderField("Content-Location", location);
}
/*!
Returns the Content-Description header field for the part, if present;
otherwise returns an empty string.
*/
QString QMailMessagePart::contentDescription() const
{
return headerFieldText("Content-Description");
}
/*!
Sets the Content-Description header field for the part to contain \a description.
*/
void QMailMessagePart::setContentDescription(const QString &description)
{
setHeaderField("Content-Description", description);
}
/*!
Returns the Content-Disposition header field for the part.
*/
QMailMessageContentDisposition QMailMessagePart::contentDisposition() const
{
return QMailMessageContentDisposition(headerField("Content-Disposition"));
}
/*!
Sets the Content-Disposition header field for the part to contain \a disposition.
*/
void QMailMessagePart::setContentDisposition(const QMailMessageContentDisposition &disposition)
{
setHeaderField("Content-Disposition", disposition.toString(false, false));
}
/*!
Returns the Content-Language header field for the part, if present;
otherwise returns an empty string.
......
......@@ -345,6 +345,12 @@ public:
QByteArray boundary() const;
void setBoundary(const QByteArray& text);
QString contentDescription() const;
void setContentDescription(const QString &s);
QMailMessageContentDisposition contentDisposition() const;
void setContentDisposition(const QMailMessageContentDisposition& disposition);
// Body management interface:
void setBody(const QMailMessageBody& body, QMailMessageBody::EncodingFormat encodingStatus = QMailMessageBody::None);
QMailMessageBody body() const;
......@@ -455,12 +461,6 @@ public:
QString contentLocation() const;
void setContentLocation(const QString &s);
QString contentDescription() const;
void setContentDescription(const QString &s);
QMailMessageContentDisposition contentDisposition() const;
void setContentDisposition(const QMailMessageContentDisposition& disposition);
QString contentLanguage() const;
void setContentLanguage(const QString &s);
......
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