summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/mailtypes.cpp
Unidiff
Diffstat (limited to 'kmicromail/libmailwrapper/mailtypes.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/mailtypes.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/kmicromail/libmailwrapper/mailtypes.cpp b/kmicromail/libmailwrapper/mailtypes.cpp
index d43bdc6..1a4ffd1 100644
--- a/kmicromail/libmailwrapper/mailtypes.cpp
+++ b/kmicromail/libmailwrapper/mailtypes.cpp
@@ -14,25 +14,48 @@ RecMail::RecMail()
14RecMail::RecMail(const RecMail&old) 14RecMail::RecMail(const RecMail&old)
15 :Opie::Core::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7) 15 :Opie::Core::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7)
16{ 16{
17 init(); 17 init();
18 copy_old(old); 18 copy_old(old);
19 // odebug << "Copy constructor RecMail" << oendl; 19 // odebug << "Copy constructor RecMail" << oendl;
20} 20}
21 21
22RecMail::~RecMail() 22RecMail::~RecMail()
23{ 23{
24 wrapper = 0; 24 wrapper = 0;
25} 25}
26static bool stringCompareRec( const QString& s1, const QString& s2 )
27{
28 if ( s1.isEmpty() && s2.isEmpty() )
29 return true;
30 return s1 == s2;
31}
32
33bool RecMail::isEqual( RecMail* r1 )
34{
35 if ( !stringCompareRec( isodate, r1->isodate ) ) {
36 // qDebug("date *%s* *%s* ", isodate.latin1(), r1->isodate.latin1());
37 return false;
38 }
39 if ( !stringCompareRec( from, r1->from ) ) {
40 //qDebug("from *%s* *%s* ", from.latin1(), r1->from.latin1());
41 return false;
42 }
43 if ( !stringCompareRec( subject, r1->subject ) ) {
44 //qDebug("sub ");
45 return false;
46 }
26 47
48 return true;
49}
27void RecMail::copy_old(const RecMail&old) 50void RecMail::copy_old(const RecMail&old)
28{ 51{
29 subject = old.subject; 52 subject = old.subject;
30 date = old.date; 53 date = old.date;
31 mbox = old.mbox; 54 mbox = old.mbox;
32 msg_id = old.msg_id; 55 msg_id = old.msg_id;
33 msg_size = old.msg_size; 56 msg_size = old.msg_size;
34 msg_number = old.msg_number; 57 msg_number = old.msg_number;
35 from = old.from; 58 from = old.from;
36 msg_flags = old.msg_flags; 59 msg_flags = old.msg_flags;
37 to = old.to; 60 to = old.to;
38 cc = old.cc; 61 cc = old.cc;