Bug corrected in MimeMultiPart.
Getter and setter for content in MimeMessage.
This commit is contained in:
parent
9bd83ace6f
commit
1071beb43d
@ -33,13 +33,19 @@ MimeMessage::MimeMessage(bool createAutoMimeContent) :
|
|||||||
|
|
||||||
MimeMessage::~MimeMessage()
|
MimeMessage::~MimeMessage()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* [1] --- */
|
/* [1] --- */
|
||||||
|
|
||||||
|
|
||||||
/* [2] Getters and Setters */
|
/* [2] Getters and Setters */
|
||||||
|
MimePart& MimeMessage::getContent() {
|
||||||
|
return *content;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MimeMessage::setContent(MimePart *content) {
|
||||||
|
this->content = content;
|
||||||
|
}
|
||||||
|
|
||||||
void MimeMessage::setSender(EmailAddress* e)
|
void MimeMessage::setSender(EmailAddress* e)
|
||||||
{
|
{
|
||||||
|
@ -59,6 +59,8 @@ public:
|
|||||||
const QString & getSubject() const;
|
const QString & getSubject() const;
|
||||||
const QList<MimePart*> & getParts() const;
|
const QList<MimePart*> & getParts() const;
|
||||||
|
|
||||||
|
MimePart& getContent();
|
||||||
|
void setContent(MimePart *content);
|
||||||
/* [2] --- */
|
/* [2] --- */
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,7 +36,6 @@ MimeMultiPart::MimeMultiPart(MultiPartType type)
|
|||||||
this->cType = MULTI_PART_NAMES[this->type];
|
this->cType = MULTI_PART_NAMES[this->type];
|
||||||
this->cEncoding = _8Bit;
|
this->cEncoding = _8Bit;
|
||||||
|
|
||||||
qsrand(QTime::currentTime().msec());
|
|
||||||
QCryptographicHash md5(QCryptographicHash::Md5);
|
QCryptographicHash md5(QCryptographicHash::Md5);
|
||||||
md5.addData(QByteArray().append(qrand()));
|
md5.addData(QByteArray().append(qrand()));
|
||||||
cBoundary = md5.result().toHex();
|
cBoundary = md5.result().toHex();
|
||||||
@ -71,6 +70,7 @@ void MimeMultiPart::prepare() {
|
|||||||
|
|
||||||
void MimeMultiPart::setMimeType(const MultiPartType type) {
|
void MimeMultiPart::setMimeType(const MultiPartType type) {
|
||||||
this->type = type;
|
this->type = type;
|
||||||
|
this->cType = MULTI_PART_NAMES[type];
|
||||||
}
|
}
|
||||||
|
|
||||||
MimeMultiPart::MultiPartType MimeMultiPart::getMimeType() const {
|
MimeMultiPart::MultiPartType MimeMultiPart::getMimeType() const {
|
||||||
|
@ -67,7 +67,6 @@ protected:
|
|||||||
QList< MimePart* > parts;
|
QList< MimePart* > parts;
|
||||||
|
|
||||||
MultiPartType type;
|
MultiPartType type;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user