Bug corrected in MimeMultiPart.

Getter and setter for content in MimeMessage.
This commit is contained in:
Tőkés Attila 2012-08-09 22:17:07 +03:00 committed by Attila
parent 9bd83ace6f
commit 1071beb43d
4 changed files with 10 additions and 3 deletions

View File

@ -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)
{ {

View File

@ -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] --- */

View File

@ -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 {

View File

@ -68,7 +68,6 @@ protected:
MultiPartType type; MultiPartType type;
}; };
#endif // MIMEMULTIPART_H #endif // MIMEMULTIPART_H