author | zautrix <zautrix> | 2005-01-24 18:05:48 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-24 18:05:48 (UTC) |
commit | 77f93c632b66b5c8d92e4c63330362272ca1fc40 (patch) (unidiff) | |
tree | 31f28656062c899b5368f13ab594ff6fa5c657fa /kmicromail/libmailwrapper | |
parent | 6c89efd80c1e94a0c070025d07c7a4c656f2a81e (diff) | |
download | kdepimpi-77f93c632b66b5c8d92e4c63330362272ca1fc40.zip kdepimpi-77f93c632b66b5c8d92e4c63330362272ca1fc40.tar.gz kdepimpi-77f93c632b66b5c8d92e4c63330362272ca1fc40.tar.bz2 |
mail fixes
-rw-r--r-- | kmicromail/libmailwrapper/mailtypes.cpp | 17 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/mailtypes.h | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/kmicromail/libmailwrapper/mailtypes.cpp b/kmicromail/libmailwrapper/mailtypes.cpp index 89150ad..96d55e6 100644 --- a/kmicromail/libmailwrapper/mailtypes.cpp +++ b/kmicromail/libmailwrapper/mailtypes.cpp | |||
@@ -27,12 +27,29 @@ static bool stringCompareRec( const QString& s1, const QString& s2 ) | |||
27 | { | 27 | { |
28 | if ( s1.isEmpty() && s2.isEmpty() ) | 28 | if ( s1.isEmpty() && s2.isEmpty() ) |
29 | return true; | 29 | return true; |
30 | return s1 == s2; | 30 | return s1 == s2; |
31 | } | 31 | } |
32 | 32 | ||
33 | const QString RecMail::MsgsizeString() const | ||
34 | { | ||
35 | |||
36 | double s = msg_size; | ||
37 | int w = 0; | ||
38 | s/=1024; | ||
39 | if (s>999.0) { | ||
40 | s/=1024.0; | ||
41 | ++w; | ||
42 | } | ||
43 | QString fsize = QString::number( s, 'f', 2 ); | ||
44 | if ( w == 0 ) { | ||
45 | fsize += "kB" ; | ||
46 | } else | ||
47 | fsize += "MB" ; | ||
48 | return fsize; | ||
49 | } | ||
33 | bool RecMail::isEqual( RecMail* r1 ) | 50 | bool RecMail::isEqual( RecMail* r1 ) |
34 | { | 51 | { |
35 | if ( !stringCompareRec( isodate, r1->isodate ) ) { | 52 | if ( !stringCompareRec( isodate, r1->isodate ) ) { |
36 | //qDebug("date *%s* *%s* ", isodate.latin1(), r1->isodate.latin1()); | 53 | //qDebug("date *%s* *%s* ", isodate.latin1(), r1->isodate.latin1()); |
37 | return false; | 54 | return false; |
38 | } | 55 | } |
diff --git a/kmicromail/libmailwrapper/mailtypes.h b/kmicromail/libmailwrapper/mailtypes.h index 32d92c0..39c0bac 100644 --- a/kmicromail/libmailwrapper/mailtypes.h +++ b/kmicromail/libmailwrapper/mailtypes.h | |||
@@ -52,12 +52,13 @@ public: | |||
52 | void setMsgid(const QString&id){msg_id=id;} | 52 | void setMsgid(const QString&id){msg_id=id;} |
53 | const QString&Msgid()const{return msg_id;} | 53 | const QString&Msgid()const{return msg_id;} |
54 | void setReplyto(const QString&reply){replyto=reply;} | 54 | void setReplyto(const QString&reply){replyto=reply;} |
55 | const QString&Replyto()const{return replyto;} | 55 | const QString&Replyto()const{return replyto;} |
56 | void setMsgsize(unsigned int size){msg_size = size;} | 56 | void setMsgsize(unsigned int size){msg_size = size;} |
57 | const unsigned int Msgsize()const{return msg_size;} | 57 | const unsigned int Msgsize()const{return msg_size;} |
58 | const QString MsgsizeString()const; | ||
58 | 59 | ||
59 | 60 | ||
60 | void setTo(const QStringList&list); | 61 | void setTo(const QStringList&list); |
61 | const QStringList&To()const; | 62 | const QStringList&To()const; |
62 | void setCC(const QStringList&list); | 63 | void setCC(const QStringList&list); |
63 | const QStringList&CC()const; | 64 | const QStringList&CC()const; |