author | zautrix <zautrix> | 2005-01-24 21:52:37 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-24 21:52:37 (UTC) |
commit | 9e6b4366c59c7d9939a6f44be9d32c4bc553869f (patch) (unidiff) | |
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 | |||
@@ -26,14 +26,14 @@ RecMail::~RecMail() | |||
26 | static bool stringCompareRec( const QString& s1, const QString& s2 ) | 26 | 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 | #if 0 | |
33 | const QString RecMail::MsgsizeString() const | 33 | QString RecMail::MsgsizeString() const |
34 | { | 34 | { |
35 | 35 | ||
36 | double s = msg_size; | 36 | double s = msg_size; |
37 | int w = 0; | 37 | int w = 0; |
38 | s/=1024; | 38 | s/=1024; |
39 | if (s>999.0) { | 39 | if (s>999.0) { |
@@ -44,12 +44,13 @@ const QString RecMail::MsgsizeString() const | |||
44 | if ( w == 0 ) { | 44 | if ( w == 0 ) { |
45 | fsize += "kB" ; | 45 | fsize += "kB" ; |
46 | } else | 46 | } else |
47 | fsize += "MB" ; | 47 | fsize += "MB" ; |
48 | return fsize; | 48 | return fsize; |
49 | } | 49 | } |
50 | #endif | ||
50 | bool RecMail::isEqual( RecMail* r1 ) | 51 | bool RecMail::isEqual( RecMail* r1 ) |
51 | { | 52 | { |
52 | if ( !stringCompareRec( isodate, r1->isodate ) ) { | 53 | if ( !stringCompareRec( isodate, r1->isodate ) ) { |
53 | //qDebug("date *%s* *%s* ", isodate.latin1(), r1->isodate.latin1()); | 54 | //qDebug("date *%s* *%s* ", isodate.latin1(), r1->isodate.latin1()); |
54 | return false; | 55 | return false; |
55 | } | 56 | } |
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 | |||
@@ -52,15 +52,27 @@ 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 | const QString MsgsizeString()const { |
59 | 59 | double s = msg_size; | |
60 | 60 | int w = 0; | |
61 | s/=1024; | ||
62 | if (s>999.0) { | ||
63 | s/=1024.0; | ||
64 | ++w; | ||
65 | } | ||
66 | QString fsize = QString::number( s, 'f', 2 ); | ||
67 | if ( w == 0 ) { | ||
68 | fsize += "kB" ; | ||
69 | } else | ||
70 | fsize += "MB" ; | ||
71 | return fsize; | ||
72 | }; | ||
61 | void setTo(const QStringList&list); | 73 | void setTo(const QStringList&list); |
62 | const QStringList&To()const; | 74 | const QStringList&To()const; |
63 | void setCC(const QStringList&list); | 75 | void setCC(const QStringList&list); |
64 | const QStringList&CC()const; | 76 | const QStringList&CC()const; |
65 | void setBcc(const QStringList&list); | 77 | void setBcc(const QStringList&list); |
66 | const QStringList&Bcc()const; | 78 | const QStringList&Bcc()const; |