Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'empty' into 'master'
[messagingframework] Move contentDisposition into QMailMessagePartContainer, contributes to MER#1579

See merge request !4
  • Loading branch information
Andrew Branson committed Jul 3, 2017
2 parents f1d0cdc + c13c1b2 commit d71ea8a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 39 deletions.
66 changes: 33 additions & 33 deletions qmf/src/libraries/qmfclient/qmailmessage.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions qmf/src/libraries/qmfclient/qmailmessage.h
Expand Up @@ -345,6 +345,12 @@ class QMF_EXPORT QMailMessagePartContainer : public QPrivatelyImplemented<QMailM
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;
Expand Down Expand Up @@ -455,12 +461,6 @@ class QMF_EXPORT QMailMessagePart : public QMailMessagePartContainer, public QMa
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);

Expand Down

0 comments on commit d71ea8a

Please sign in to comment.