Destructor for mimefile.

Getter for maximum length in MimeContentFormatter
Added getter to MimeContentFormatter in the MimePart class.
This commit is contained in:
Tőkés Attila 2012-08-09 20:27:32 +03:00 committed by Attila
parent 1560ab819f
commit c4e94b885e
5 changed files with 16 additions and 3 deletions

View File

@ -22,7 +22,7 @@ MimeContentFormatter::MimeContentFormatter(int max_length) :
max_length(max_length)
{}
QString MimeContentFormatter::format(const QString &content, bool quotedPrintable) {
QString MimeContentFormatter::format(const QString &content, bool quotedPrintable) const {
QString out;
@ -60,3 +60,7 @@ QString MimeContentFormatter::format(const QString &content, bool quotedPrintabl
void MimeContentFormatter::setMaxLength(int l) {
max_length = l;
}
int MimeContentFormatter::getMaxLength() const {
return max_length;
}

View File

@ -29,8 +29,9 @@ public:
MimeContentFormatter (int max_length = 76);
void setMaxLength(int l);
int getMaxLength() const;
QString format(const QString &content, bool quotedPrintable = false);
QString format(const QString &content, bool quotedPrintable = false) const;
protected:
int max_length;

View File

@ -31,6 +31,7 @@ MimeFile::MimeFile(QFile *file)
MimeFile::~MimeFile()
{
delete file;
}
/* [1] --- */

View File

@ -113,6 +113,11 @@ MimePart::Encoding MimePart::getEncoding() const
return this->cEncoding;
}
MimeContentFormatter& MimePart::getContentFormatter()
{
return this->formatter;
}
/* [2] --- */

View File

@ -72,6 +72,8 @@ public:
void setEncoding(Encoding enc);
Encoding getEncoding() const;
MimeContentFormatter& getContentFormatter();
/* [2] --- */