author | zautrix <zautrix> | 2005-01-24 21:52:37 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-24 21:52:37 (UTC) |
commit | 9e6b4366c59c7d9939a6f44be9d32c4bc553869f (patch) (side-by-side diff) | |
tree | 36ce58d894c9edb2b02717c525f32b3013460aa4 /kmicromail | |
parent | 60733d98dff3ff5f8e95c514af258498aa7aa014 (diff) | |
download | kdepimpi-9e6b4366c59c7d9939a6f44be9d32c4bc553869f.zip kdepimpi-9e6b4366c59c7d9939a6f44be9d32c4bc553869f.tar.gz kdepimpi-9e6b4366c59c7d9939a6f44be9d32c4bc553869f.tar.bz2 |
compile fix
-rw-r--r-- | kmicromail/libmailwrapper/mailtypes.cpp | 5 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/mailtypes.h | 18 |
2 files changed, 18 insertions, 5 deletions
diff --git a/kmicromail/libmailwrapper/mailtypes.cpp b/kmicromail/libmailwrapper/mailtypes.cpp index 96d55e6..70a0ab5 100644 --- a/kmicromail/libmailwrapper/mailtypes.cpp +++ b/kmicromail/libmailwrapper/mailtypes.cpp @@ -20,42 +20,43 @@ RecMail::RecMail(const RecMail&old) } RecMail::~RecMail() { wrapper = 0; } static bool stringCompareRec( const QString& s1, const QString& s2 ) { if ( s1.isEmpty() && s2.isEmpty() ) return true; return s1 == s2; } - -const QString RecMail::MsgsizeString() const +#if 0 +QString RecMail::MsgsizeString() const { double s = msg_size; int w = 0; s/=1024; if (s>999.0) { s/=1024.0; ++w; } QString fsize = QString::number( s, 'f', 2 ); if ( w == 0 ) { fsize += "kB" ; } else fsize += "MB" ; return fsize; } +#endif bool RecMail::isEqual( RecMail* r1 ) { if ( !stringCompareRec( isodate, r1->isodate ) ) { //qDebug("date *%s* *%s* ", isodate.latin1(), r1->isodate.latin1()); return false; } if ( !stringCompareRec( subject.left(40), r1->subject.left(40) ) ) { //qDebug("sub *%s* *%s*", subject.latin1(), r1->subject.latin1()); return false; } //qDebug("date *%s* *%s* ", isodate.latin1(), r1->isodate.latin1()); diff --git a/kmicromail/libmailwrapper/mailtypes.h b/kmicromail/libmailwrapper/mailtypes.h index 39c0bac..97f10d7 100644 --- a/kmicromail/libmailwrapper/mailtypes.h +++ b/kmicromail/libmailwrapper/mailtypes.h @@ -46,27 +46,39 @@ public: const QString&getFrom()const{ return from; } void setFrom( const QString&a ) { from = a; } const QString&getSubject()const { return subject; } void setSubject( const QString&s ) { subject = s; } const QString&getMbox()const{return mbox;} void setMbox(const QString&box){mbox = box;} void setMsgid(const QString&id){msg_id=id;} const QString&Msgid()const{return msg_id;} void setReplyto(const QString&reply){replyto=reply;} const QString&Replyto()const{return replyto;} void setMsgsize(unsigned int size){msg_size = size;} const unsigned int Msgsize()const{return msg_size;} - const QString MsgsizeString()const; - - + const QString MsgsizeString()const { + double s = msg_size; + int w = 0; + s/=1024; + if (s>999.0) { + s/=1024.0; + ++w; + } + QString fsize = QString::number( s, 'f', 2 ); + if ( w == 0 ) { + fsize += "kB" ; + } else + fsize += "MB" ; + return fsize; + }; void setTo(const QStringList&list); const QStringList&To()const; void setCC(const QStringList&list); const QStringList&CC()const; void setBcc(const QStringList&list); const QStringList&Bcc()const; void setInreply(const QStringList&list); const QStringList&Inreply()const; void setReferences(const QStringList&list); const QStringList&References()const; const QBitArray&getFlags()const{return msg_flags;} |