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/libmailwrapper | |
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) | |||
20 | } | 20 | } |
21 | 21 | ||
22 | RecMail::~RecMail() | 22 | RecMail::~RecMail() |
23 | { | 23 | { |
24 | wrapper = 0; | 24 | wrapper = 0; |
25 | } | 25 | } |
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) { |
40 | s/=1024.0; | 40 | s/=1024.0; |
41 | ++w; | 41 | ++w; |
42 | } | 42 | } |
43 | QString fsize = QString::number( s, 'f', 2 ); | 43 | QString fsize = QString::number( s, 'f', 2 ); |
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 | } |
56 | if ( !stringCompareRec( subject.left(40), r1->subject.left(40) ) ) { | 57 | if ( !stringCompareRec( subject.left(40), r1->subject.left(40) ) ) { |
57 | //qDebug("sub *%s* *%s*", subject.latin1(), r1->subject.latin1()); | 58 | //qDebug("sub *%s* *%s*", subject.latin1(), r1->subject.latin1()); |
58 | return false; | 59 | return false; |
59 | } | 60 | } |
60 | 61 | ||
61 | //qDebug("date *%s* *%s* ", isodate.latin1(), r1->isodate.latin1()); | 62 | //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: | |||
46 | const QString&getFrom()const{ return from; } | 46 | const QString&getFrom()const{ return from; } |
47 | void setFrom( const QString&a ) { from = a; } | 47 | void setFrom( const QString&a ) { from = a; } |
48 | const QString&getSubject()const { return subject; } | 48 | const QString&getSubject()const { return subject; } |
49 | void setSubject( const QString&s ) { subject = s; } | 49 | void setSubject( const QString&s ) { subject = s; } |
50 | const QString&getMbox()const{return mbox;} | 50 | const QString&getMbox()const{return mbox;} |
51 | void setMbox(const QString&box){mbox = box;} | 51 | void setMbox(const QString&box){mbox = box;} |
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; |
67 | void setInreply(const QStringList&list); | 79 | void setInreply(const QStringList&list); |
68 | const QStringList&Inreply()const; | 80 | const QStringList&Inreply()const; |
69 | void setReferences(const QStringList&list); | 81 | void setReferences(const QStringList&list); |
70 | const QStringList&References()const; | 82 | const QStringList&References()const; |
71 | 83 | ||
72 | const QBitArray&getFlags()const{return msg_flags;} | 84 | const QBitArray&getFlags()const{return msg_flags;} |